Coefficients for tests

For our numerical simulations, we use four different diffusion coefficients. These coefficients are presented in the following. For the motivation and further explanations, we refer to the thesis.


In [1]:
import os
import sys
import numpy as np

%matplotlib notebook
import matplotlib.pyplot as plt
from visualize import drawCoefficient

import buildcoef2d

Coefficient 1


In [2]:
bg = 0.05    #background
val = 1	     #values

NWorldFine = np.array([256, 256])

#Coefficient 1
CoefClass1 = buildcoef2d.Coefficient2d(NWorldFine,
                        bg                  = bg,
                        val                 = val,
                        length              = 2,
                        thick               = 2,
                        space               = 2,
                        probfactor          = 1,
                        right               = 1,
                        down                = 0,
                        diagr1              = 0,
                        diagr2              = 0,
                        diagl1              = 0,
                        diagl2              = 0,
                        LenSwitch           = None,
                        thickSwitch         = None,
                        equidistant         = True,
                        ChannelHorizontal   = None,
                        ChannelVertical     = None,
                        BoundarySpace       = True)

A1 = CoefClass1.BuildCoefficient()        
A1 = A1.flatten()

plt.figure("Coefficient 1")
drawCoefficient(NWorldFine, A1, greys=True)
plt.title('Coefficient 1')
plt.show()


Coefficient 2


In [3]:
CoefClass2 = buildcoef2d.Coefficient2d(NWorldFine, 
                        bg                  = bg,
                        val                 = val,
                        length              = 1,
                        thick               = 1,
                        space               = 2,
                        probfactor          = 1,
                        right               = 0,
                        down                = 0,
                        diagr1              = 0,
                        diagr2              = 0,
                        diagl1              = 0,
                        diagl2              = 0,
                        LenSwitch           = None,
                        thickSwitch         = None,
                        equidistant         = True,
                        ChannelHorizontal   = None,
                        ChannelVertical     = True,
                        BoundarySpace       = True)

A2 = CoefClass2.BuildCoefficient()
A2 = A2.flatten()

plt.figure("Coefficient 2")
drawCoefficient(NWorldFine, A2, greys=True)
plt.title('Coefficient 2')
plt.show()


Coefficient 3


In [4]:
CoefClass3 = buildcoef2d.Coefficient2d(NWorldFine, 
                        bg                  = bg, 
                        val                 = val, 
                        length              = 8, 
                        thick               = 2, 
                        space               = 4, 
                        probfactor          = 1, 
                        right               = 0, 
                        down                = 0, 
                        diagr1              = 0, 
                        diagr2              = 0, 
                        diagl1              = 0, 
                        diagl2              = 1, 
                        LenSwitch           = None, 
                        thickSwitch         = None, 
                        equidistant         = None, 
                        ChannelHorizontal   = None, 
                        ChannelVertical     = None,
                        BoundarySpace       = True)

A3 = CoefClass3.BuildCoefficient()
A3 = A3.flatten()

plt.figure("Coefficient 3")
drawCoefficient(NWorldFine, A3, greys=True)
plt.title('Coefficient 3')
plt.show()


Coefficient 4


In [5]:
CoefClass4 = buildcoef2d.Coefficient2d(NWorldFine, 
                        bg                  = bg, 
                        val                 = val, 
                        thick               = 1, 
                        space               = 0, 
                        probfactor          = 1, 
                        right               = 0, 
                        down                = 0, 
                        diagr1              = 1, 
                        diagr2              = 0, 
                        diagl1              = 1, 
                        diagl2              = 0, 
                        LenSwitch           = [4,5,6,7,8], 
                        thickSwitch         = None, 
                        equidistant         = None, 
                        ChannelHorizontal   = None, 
                        ChannelVertical     = None,
                        BoundarySpace       = None) 

A4 = CoefClass4.BuildCoefficient()
A4 = A4.flatten()

plt.figure("Coefficient 4")
drawCoefficient(NWorldFine, A4, greys=True)
plt.title('Coefficient 4')
plt.show()