KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
Functions | Variables
quadrature Namespace Reference

Functions

def ExactIntegrationOfSinus (t, a=None, b=None)
 
def ExactIntegrationOfSinusWithExponentialKernel (t, ti, alpha=None, beta=None)
 
def ExactIntegrationOfTail (end_time, end_time_minus_tw, initial_time, ais, tis)
 
def ApproximateQuadrature (times, f)
 
def NaiveQuadrature (times, f)
 
def Alpha (n, j)
 
def Beta (n, j)
 
def Gamma (n, j)
 
def Coefficient (order, n, j)
 
def Daitche (times, f, order)
 
def DaitcheTimesAndIntegrands (times, integrands, order)
 
def Phi (t)
 
def Hinsberg (m, t_win, times, f, which_set_of_points='hinsberg')
 
def OmegaTaylorTerms (alpha, bi, pi)
 
def A (alpha, p, f, t, times, c=1)
 
def Bombardelli (times, f_to_integrate, order=1)
 
def SubstituteRichardsons (approx_successive_values, k, order, level=- 1)
 
def SubstituteEmpiricalRichardsons (approx_successive_values, k, order, level=- 1)
 
def SubstituteShanks (approx_sequence)
 
def LogInterpolation (a, b)
 

Variables

int end_time = 10
 
float t_win = 1.0
 
int n_discretizations = 7
 
int min_exp = 3
 
int k = 2
 
int m = 10
 
int order_bomb = 1
 
 f = math.sin
 
list n_div = [k ** (min_exp + i) for i in range(n_discretizations)]
 
list n_sizes = [end_time / number for number in n_div]
 
int n_theor_slopes = 2
 
 n_samples = int(min(8, n_div[0]))
 
list exact_values = [0] * n_discretizations
 
list approx_values_naive = [0] * n_discretizations
 
list approx_values_1 = [0] * n_discretizations
 
list approx_values_2 = [0] * n_discretizations
 
list approx_values_3 = [0] * n_discretizations
 
list approx_values_bomb = [0] * n_discretizations
 
list approx_values_hins = [0] * n_discretizations
 
list approx_values_hins_t_norm = [0] * n_discretizations
 
list approx_values_hins_abs = [0] * n_discretizations
 
list errors_naive = [0] * n_discretizations
 
list errors_1 = [0] * n_discretizations
 
list errors_2 = [0] * n_discretizations
 
list errors_3 = [0] * n_discretizations
 
list errors_bomb = [0] * n_discretizations
 
list errors_hins = [0] * n_discretizations
 
list errors_hins_t_norm = [0] * n_discretizations
 
list errors_hins_abs = [0] * n_discretizations
 
list errors_naive_rich = [0] * n_discretizations
 
list errors_1_rich = [0] * n_discretizations
 
list errors_2_rich = [0] * n_discretizations
 
list errors_3_rich = [0] * n_discretizations
 
list errors_bomb_rich = [0] * n_discretizations
 
list errors_hins_rich = [0] * n_discretizations
 
list errors_naive_rich_emp = [0] * n_discretizations
 
list errors_1_rich_emp = [0] * n_discretizations
 
list errors_2_rich_emp = [0] * n_discretizations
 
list errors_3_rich_emp = [0] * n_discretizations
 
list errors_bomb_rich_emp = [0] * n_discretizations
 
list errors_hins_rich_emp = [0] * n_discretizations
 
list errors_naive_shank = [0] * n_discretizations
 
list errors_1_shank = [0] * n_discretizations
 
list errors_2_shank = [0] * n_discretizations
 
list errors_3_shank = [0] * n_discretizations
 
list errors_bomb_shank = [0] * n_discretizations
 
list errors_hins_shank = [0] * n_discretizations
 
int j = 0
 
int h = end_time / n_divisions
 
list times = [h * delta for delta in range(n_divisions * i // n_samples)]
 
 exact_value = float(ExactIntegrationOfSinus(times[-1]))
 
def approx_value_1 = Daitche(times, f, 1)
 
def approx_value_2 = Daitche(times, f, 2)
 
def approx_value_3 = Daitche(times, f, 3)
 
def approx_value_bomb = Bombardelli(times, f, order_bomb)
 
def approx_value_hins = Hinsberg(m, t_win, times, f)
 
def approx_value_hins_t_norm = Hinsberg(m, t_win, times, f, 't-norm')
 
def approx_value_hins_abs = Hinsberg(m, t_win, times, f, 'abs-norm')
 
int approx_value_naive = 1
 
 error_naive = abs(approx_value_naive - exact_value)
 
 error_1 = abs(approx_value_1 - exact_value)
 
 error_2 = abs(approx_value_2 - exact_value)
 
 error_3 = abs(approx_value_3 - exact_value)
 
 error_bomb = abs(approx_value_bomb - exact_value)
 
 error_hins = abs(approx_value_hins - exact_value)
 
 error_hins_t_norm = abs(approx_value_hins_t_norm - exact_value)
 
 error_hins_abs = abs(approx_value_hins_abs - exact_value)
 
list approx_values_naive_rich = [value for value in approx_values_naive]
 
list approx_values_1_rich = [value for value in approx_values_1]
 
list approx_values_2_rich = [value for value in approx_values_2]
 
list approx_values_3_rich = [value for value in approx_values_3]
 
list approx_values_bomb_rich = [value for value in approx_values_bomb]
 
list approx_values_hins_rich = [value for value in approx_values_hins]
 
list approx_values_naive_rich_emp = [value for value in approx_values_naive]
 
list approx_values_1_rich_emp = [value for value in approx_values_1]
 
list approx_values_2_rich_emp = [value for value in approx_values_2]
 
list approx_values_3_rich_emp = [value for value in approx_values_3]
 
list approx_values_bomb_rich_emp = [value for value in approx_values_bomb]
 
list approx_values_hins_rich_emp = [value for value in approx_values_hins]
 
list approx_values_naive_shank = [value for value in approx_values_naive]
 
list approx_values_1_shank = [value for value in approx_values_1]
 
list approx_values_2_shank = [value for value in approx_values_2]
 
list approx_values_3_shank = [value for value in approx_values_3]
 
list approx_values_bomb_shank = [value for value in approx_values_bomb]
 
list approx_values_hins_shank = [value for value in approx_values_hins]
 
list theoretical_slope_naive = []
 
list theoretical_slope_1 = [errors_1[- 1] / 0.5 ** (2 * (n_theor_slopes - i) - 0.5) for i in range(n_theor_slopes)]
 
list theoretical_slope_2 = [errors_2[- 1] / 0.5 ** (3 * (n_theor_slopes - i) - 1.5) for i in range(n_theor_slopes)]
 
list theoretical_slope_3 = [errors_3[- 1] / 0.5 ** (4 * (n_theor_slopes - i) - 2.5) for i in range(n_theor_slopes)]
 
list theoretical_slope_bomb = [errors_bomb[- 1] / 0.5 ** (1 * (n_theor_slopes - i) + 0.5) for i in range(n_theor_slopes)]
 
list theoretical_slope_hins = [errors_hins[- 1] / 0.5 ** (2 * (n_theor_slopes - i) - 0.5) for i in range(n_theor_slopes)]
 
 color
 
 linestyle
 
 linewidth
 
 ms
 
 marker
 
 label
 
list bomb_sizes = [size / 1 for size in n_sizes]
 
 mew
 
list annotation_cooors_naive = [LogInterpolation(n_sizes[- 1], n_sizes[- 2]), LogInterpolation(theoretical_slope_naive[- 1], theoretical_slope_naive[- 2])]
 
list annotation_cooors_1 = [LogInterpolation(n_sizes[- 1], n_sizes[- 2]), LogInterpolation(theoretical_slope_1[- 1], theoretical_slope_1[- 2])]
 
list annotation_cooors_2 = [LogInterpolation(n_sizes[- 1], n_sizes[- 2]), LogInterpolation(theoretical_slope_2[- 1], theoretical_slope_2[- 2])]
 
 xy
 
 xycoords
 
 xytext
 
 textcoords
 
 fontsize
 
 arrowprops
 
list annotation_cooors_3 = [LogInterpolation(n_sizes[- 1], n_sizes[- 2]), LogInterpolation(theoretical_slope_3[- 1], theoretical_slope_3[- 2])]
 
list annotation_cooors_bomb = [LogInterpolation(n_sizes[- 1], n_sizes[- 2]), LogInterpolation(theoretical_slope_bomb[- 1], theoretical_slope_bomb[- 2])]
 
 loc
 
 prop
 
 frameon
 
 format
 
 dpi
 

Function Documentation

◆ A()

def quadrature.A (   alpha,
  p,
  f,
  t,
  times,
  c = 1 
)

◆ Alpha()

def quadrature.Alpha (   n,
  j 
)

◆ ApproximateQuadrature()

def quadrature.ApproximateQuadrature (   times,
  f 
)

◆ Beta()

def quadrature.Beta (   n,
  j 
)

◆ Bombardelli()

def quadrature.Bombardelli (   times,
  f_to_integrate,
  order = 1 
)

◆ Coefficient()

def quadrature.Coefficient (   order,
  n,
  j 
)

◆ Daitche()

def quadrature.Daitche (   times,
  f,
  order 
)

◆ DaitcheTimesAndIntegrands()

def quadrature.DaitcheTimesAndIntegrands (   times,
  integrands,
  order 
)

◆ ExactIntegrationOfSinus()

def quadrature.ExactIntegrationOfSinus (   t,
  a = None,
  b = None 
)

◆ ExactIntegrationOfSinusWithExponentialKernel()

def quadrature.ExactIntegrationOfSinusWithExponentialKernel (   t,
  ti,
  alpha = None,
  beta = None 
)

◆ ExactIntegrationOfTail()

def quadrature.ExactIntegrationOfTail (   end_time,
  end_time_minus_tw,
  initial_time,
  ais,
  tis 
)

◆ Gamma()

def quadrature.Gamma (   n,
  j 
)

◆ Hinsberg()

def quadrature.Hinsberg (   m,
  t_win,
  times,
  f,
  which_set_of_points = 'hinsberg' 
)

◆ LogInterpolation()

def quadrature.LogInterpolation (   a,
  b 
)

◆ NaiveQuadrature()

def quadrature.NaiveQuadrature (   times,
  f 
)

◆ OmegaTaylorTerms()

def quadrature.OmegaTaylorTerms (   alpha,
  bi,
  pi 
)

◆ Phi()

def quadrature.Phi (   t)

◆ SubstituteEmpiricalRichardsons()

def quadrature.SubstituteEmpiricalRichardsons (   approx_successive_values,
  k,
  order,
  level = - 1 
)

◆ SubstituteRichardsons()

def quadrature.SubstituteRichardsons (   approx_successive_values,
  k,
  order,
  level = - 1 
)

◆ SubstituteShanks()

def quadrature.SubstituteShanks (   approx_sequence)

Variable Documentation

◆ annotation_cooors_1

list quadrature.annotation_cooors_1 = [LogInterpolation(n_sizes[- 1], n_sizes[- 2]), LogInterpolation(theoretical_slope_1[- 1], theoretical_slope_1[- 2])]

◆ annotation_cooors_2

list quadrature.annotation_cooors_2 = [LogInterpolation(n_sizes[- 1], n_sizes[- 2]), LogInterpolation(theoretical_slope_2[- 1], theoretical_slope_2[- 2])]

◆ annotation_cooors_3

list quadrature.annotation_cooors_3 = [LogInterpolation(n_sizes[- 1], n_sizes[- 2]), LogInterpolation(theoretical_slope_3[- 1], theoretical_slope_3[- 2])]

◆ annotation_cooors_bomb

list quadrature.annotation_cooors_bomb = [LogInterpolation(n_sizes[- 1], n_sizes[- 2]), LogInterpolation(theoretical_slope_bomb[- 1], theoretical_slope_bomb[- 2])]

◆ annotation_cooors_naive

list quadrature.annotation_cooors_naive = [LogInterpolation(n_sizes[- 1], n_sizes[- 2]), LogInterpolation(theoretical_slope_naive[- 1], theoretical_slope_naive[- 2])]

◆ approx_value_1

def quadrature.approx_value_1 = Daitche(times, f, 1)

◆ approx_value_2

def quadrature.approx_value_2 = Daitche(times, f, 2)

◆ approx_value_3

def quadrature.approx_value_3 = Daitche(times, f, 3)

◆ approx_value_bomb

def quadrature.approx_value_bomb = Bombardelli(times, f, order_bomb)

◆ approx_value_hins

def quadrature.approx_value_hins = Hinsberg(m, t_win, times, f)

◆ approx_value_hins_abs

def quadrature.approx_value_hins_abs = Hinsberg(m, t_win, times, f, 'abs-norm')

◆ approx_value_hins_t_norm

def quadrature.approx_value_hins_t_norm = Hinsberg(m, t_win, times, f, 't-norm')

◆ approx_value_naive

int quadrature.approx_value_naive = 1

◆ approx_values_1

list quadrature.approx_values_1 = [0] * n_discretizations

◆ approx_values_1_rich

list quadrature.approx_values_1_rich = [value for value in approx_values_1]

◆ approx_values_1_rich_emp

list quadrature.approx_values_1_rich_emp = [value for value in approx_values_1]

◆ approx_values_1_shank

list quadrature.approx_values_1_shank = [value for value in approx_values_1]

◆ approx_values_2

list quadrature.approx_values_2 = [0] * n_discretizations

◆ approx_values_2_rich

list quadrature.approx_values_2_rich = [value for value in approx_values_2]

◆ approx_values_2_rich_emp

list quadrature.approx_values_2_rich_emp = [value for value in approx_values_2]

◆ approx_values_2_shank

list quadrature.approx_values_2_shank = [value for value in approx_values_2]

◆ approx_values_3

list quadrature.approx_values_3 = [0] * n_discretizations

◆ approx_values_3_rich

list quadrature.approx_values_3_rich = [value for value in approx_values_3]

◆ approx_values_3_rich_emp

list quadrature.approx_values_3_rich_emp = [value for value in approx_values_3]

◆ approx_values_3_shank

list quadrature.approx_values_3_shank = [value for value in approx_values_3]

◆ approx_values_bomb

list quadrature.approx_values_bomb = [0] * n_discretizations

◆ approx_values_bomb_rich

list quadrature.approx_values_bomb_rich = [value for value in approx_values_bomb]

◆ approx_values_bomb_rich_emp

list quadrature.approx_values_bomb_rich_emp = [value for value in approx_values_bomb]

◆ approx_values_bomb_shank

list quadrature.approx_values_bomb_shank = [value for value in approx_values_bomb]

◆ approx_values_hins

list quadrature.approx_values_hins = [0] * n_discretizations

◆ approx_values_hins_abs

list quadrature.approx_values_hins_abs = [0] * n_discretizations

◆ approx_values_hins_rich

list quadrature.approx_values_hins_rich = [value for value in approx_values_hins]

◆ approx_values_hins_rich_emp

list quadrature.approx_values_hins_rich_emp = [value for value in approx_values_hins]

◆ approx_values_hins_shank

list quadrature.approx_values_hins_shank = [value for value in approx_values_hins]

◆ approx_values_hins_t_norm

list quadrature.approx_values_hins_t_norm = [0] * n_discretizations

◆ approx_values_naive

list quadrature.approx_values_naive = [0] * n_discretizations

◆ approx_values_naive_rich

list quadrature.approx_values_naive_rich = [value for value in approx_values_naive]

◆ approx_values_naive_rich_emp

list quadrature.approx_values_naive_rich_emp = [value for value in approx_values_naive]

◆ approx_values_naive_shank

list quadrature.approx_values_naive_shank = [value for value in approx_values_naive]

◆ arrowprops

quadrature.arrowprops

◆ bomb_sizes

list quadrature.bomb_sizes = [size / 1 for size in n_sizes]

◆ color

quadrature.color

◆ dpi

quadrature.dpi

◆ end_time

int quadrature.end_time = 10

◆ error_1

quadrature.error_1 = abs(approx_value_1 - exact_value)

◆ error_2

quadrature.error_2 = abs(approx_value_2 - exact_value)

◆ error_3

quadrature.error_3 = abs(approx_value_3 - exact_value)

◆ error_bomb

quadrature.error_bomb = abs(approx_value_bomb - exact_value)

◆ error_hins

quadrature.error_hins = abs(approx_value_hins - exact_value)

◆ error_hins_abs

quadrature.error_hins_abs = abs(approx_value_hins_abs - exact_value)

◆ error_hins_t_norm

quadrature.error_hins_t_norm = abs(approx_value_hins_t_norm - exact_value)

◆ error_naive

quadrature.error_naive = abs(approx_value_naive - exact_value)

◆ errors_1

list quadrature.errors_1 = [0] * n_discretizations

◆ errors_1_rich

list quadrature.errors_1_rich = [0] * n_discretizations

◆ errors_1_rich_emp

list quadrature.errors_1_rich_emp = [0] * n_discretizations

◆ errors_1_shank

list quadrature.errors_1_shank = [0] * n_discretizations

◆ errors_2

quadrature.errors_2 = [0] * n_discretizations

◆ errors_2_rich

list quadrature.errors_2_rich = [0] * n_discretizations

◆ errors_2_rich_emp

list quadrature.errors_2_rich_emp = [0] * n_discretizations

◆ errors_2_shank

list quadrature.errors_2_shank = [0] * n_discretizations

◆ errors_3

list quadrature.errors_3 = [0] * n_discretizations

◆ errors_3_rich

list quadrature.errors_3_rich = [0] * n_discretizations

◆ errors_3_rich_emp

list quadrature.errors_3_rich_emp = [0] * n_discretizations

◆ errors_3_shank

list quadrature.errors_3_shank = [0] * n_discretizations

◆ errors_bomb

list quadrature.errors_bomb = [0] * n_discretizations

◆ errors_bomb_rich

list quadrature.errors_bomb_rich = [0] * n_discretizations

◆ errors_bomb_rich_emp

list quadrature.errors_bomb_rich_emp = [0] * n_discretizations

◆ errors_bomb_shank

list quadrature.errors_bomb_shank = [0] * n_discretizations

◆ errors_hins

quadrature.errors_hins = [0] * n_discretizations

◆ errors_hins_abs

quadrature.errors_hins_abs = [0] * n_discretizations

◆ errors_hins_rich

list quadrature.errors_hins_rich = [0] * n_discretizations

◆ errors_hins_rich_emp

list quadrature.errors_hins_rich_emp = [0] * n_discretizations

◆ errors_hins_shank

list quadrature.errors_hins_shank = [0] * n_discretizations

◆ errors_hins_t_norm

quadrature.errors_hins_t_norm = [0] * n_discretizations

◆ errors_naive

list quadrature.errors_naive = [0] * n_discretizations

◆ errors_naive_rich

list quadrature.errors_naive_rich = [0] * n_discretizations

◆ errors_naive_rich_emp

list quadrature.errors_naive_rich_emp = [0] * n_discretizations

◆ errors_naive_shank

list quadrature.errors_naive_shank = [0] * n_discretizations

◆ exact_value

quadrature.exact_value = float(ExactIntegrationOfSinus(times[-1]))

◆ exact_values

list quadrature.exact_values = [0] * n_discretizations

◆ f

quadrature.f = math.sin

◆ fontsize

quadrature.fontsize

◆ format

quadrature.format

◆ frameon

quadrature.frameon

◆ h

int quadrature.h = end_time / n_divisions

◆ j

int quadrature.j = 0

◆ k

int quadrature.k = 2

◆ label

quadrature.label

◆ linestyle

quadrature.linestyle

◆ linewidth

quadrature.linewidth

◆ loc

quadrature.loc

◆ m

int quadrature.m = 10

◆ marker

quadrature.marker

◆ mew

quadrature.mew

◆ min_exp

int quadrature.min_exp = 3

◆ ms

quadrature.ms

◆ n_discretizations

int quadrature.n_discretizations = 7

◆ n_div

list quadrature.n_div = [k ** (min_exp + i) for i in range(n_discretizations)]

◆ n_samples

quadrature.n_samples = int(min(8, n_div[0]))

◆ n_sizes

quadrature.n_sizes = [end_time / number for number in n_div]

◆ n_theor_slopes

int quadrature.n_theor_slopes = 2

◆ order_bomb

int quadrature.order_bomb = 1

◆ prop

quadrature.prop

◆ t_win

float quadrature.t_win = 1.0

◆ textcoords

quadrature.textcoords

◆ theoretical_slope_1

list quadrature.theoretical_slope_1 = [errors_1[- 1] / 0.5 ** (2 * (n_theor_slopes - i) - 0.5) for i in range(n_theor_slopes)]

◆ theoretical_slope_2

quadrature.theoretical_slope_2 = [errors_2[- 1] / 0.5 ** (3 * (n_theor_slopes - i) - 1.5) for i in range(n_theor_slopes)]

◆ theoretical_slope_3

list quadrature.theoretical_slope_3 = [errors_3[- 1] / 0.5 ** (4 * (n_theor_slopes - i) - 2.5) for i in range(n_theor_slopes)]

◆ theoretical_slope_bomb

list quadrature.theoretical_slope_bomb = [errors_bomb[- 1] / 0.5 ** (1 * (n_theor_slopes - i) + 0.5) for i in range(n_theor_slopes)]

◆ theoretical_slope_hins

list quadrature.theoretical_slope_hins = [errors_hins[- 1] / 0.5 ** (2 * (n_theor_slopes - i) - 0.5) for i in range(n_theor_slopes)]

◆ theoretical_slope_naive

list quadrature.theoretical_slope_naive = []

◆ times

list quadrature.times = [h * delta for delta in range(n_divisions * i // n_samples)]

◆ xy

quadrature.xy

◆ xycoords

quadrature.xycoords

◆ xytext

quadrature.xytext