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
bombardelli_test Namespace Reference

Functions

def ExactIntegrationOfSinusKernel (t, a=None, b=None)
 

Variables

 f = math.sin
 
float end_time = 1.0
 
int n_steps = 100
 
float dt = end_time / n_steps
 
list times = [dt * i for i in range(n_steps)]
 
list t_win = times[0] + 0.5 * times[- 1]
 
list old_times = [time * times[i] / times[-1] for time in times]
 
list recent_times = [times[i] + time * (times[-1] - times[0] - times[i]) / (times[-1] - times[0]) for time in times]
 
float q = - 0.5
 
list t = times[- 1]
 
int N = len(times) - 1
 
list h = t / N
 
list coeff = h ** (- q)
 
list values = [gamma(k - q) / gamma(k + 1) * f(t - k * h) for k in range(N)]
 
list old_coeff = h ** (- q)
 
list old_values = [gamma(k - q) / gamma(k + 1) * (f(t - k * h) - f(t)) for k in range(N + 1)]
 
int old_correction = 2 * (sqrt(end_time) - sqrt(end_time - t)) * f(t)
 
list a = recent_times[0]
 
 initial_approx_deriv = cos(a)
 
int constant_initial_correction = 2 * sqrt(t) * f(t)
 
int linear_initial_correction = 2. / 3 * sqrt(t) * (2 * t) * initial_approx_deriv
 
int linear_correction_option = 0
 
list recent_coeff_1 = h ** (- q)
 
list recent_values_1 = [gamma(k - q) / gamma(k + 1) * (f(t - k * h + a) - f(t)) for k in range(N + 1)]
 
int recent_correction_1 = constant_initial_correction
 
list recent_coeff_2 = h ** (- q) * gamma(- q)
 
list recent_values_2 = [(- 1) ** k * gamma(q + 1) / (gamma(k + 1) * gamma(q - k + 1)) * (f(t - (k - 0.5 * q) * h + a) - f(a) - linear_correction_option * (t - (k - 0.5 * q) * h) * initial_approx_deriv) for k in range(N)]
 
 recent_correction_2 = gamma(- q) * (constant_initial_correction + linear_correction_option * linear_initial_correction)
 

Function Documentation

◆ ExactIntegrationOfSinusKernel()

def bombardelli_test.ExactIntegrationOfSinusKernel (   t,
  a = None,
  b = None 
)

Variable Documentation

◆ a

list bombardelli_test.a = recent_times[0]

◆ coeff

list bombardelli_test.coeff = h ** (- q)

◆ constant_initial_correction

int bombardelli_test.constant_initial_correction = 2 * sqrt(t) * f(t)

◆ dt

float bombardelli_test.dt = end_time / n_steps

◆ end_time

list bombardelli_test.end_time = 1.0

◆ f

bombardelli_test.f = math.sin

◆ h

list bombardelli_test.h = t / N

◆ initial_approx_deriv

bombardelli_test.initial_approx_deriv = cos(a)

◆ linear_correction_option

int bombardelli_test.linear_correction_option = 0

◆ linear_initial_correction

int bombardelli_test.linear_initial_correction = 2. / 3 * sqrt(t) * (2 * t) * initial_approx_deriv

◆ N

int bombardelli_test.N = len(times) - 1

◆ n_steps

int bombardelli_test.n_steps = 100

◆ old_coeff

list bombardelli_test.old_coeff = h ** (- q)

◆ old_correction

int bombardelli_test.old_correction = 2 * (sqrt(end_time) - sqrt(end_time - t)) * f(t)

◆ old_times

list bombardelli_test.old_times = [time * times[i] / times[-1] for time in times]

◆ old_values

list bombardelli_test.old_values = [gamma(k - q) / gamma(k + 1) * (f(t - k * h) - f(t)) for k in range(N + 1)]

◆ q

float bombardelli_test.q = - 0.5

◆ recent_coeff_1

list bombardelli_test.recent_coeff_1 = h ** (- q)

◆ recent_coeff_2

list bombardelli_test.recent_coeff_2 = h ** (- q) * gamma(- q)

◆ recent_correction_1

int bombardelli_test.recent_correction_1 = constant_initial_correction

◆ recent_correction_2

bombardelli_test.recent_correction_2 = gamma(- q) * (constant_initial_correction + linear_correction_option * linear_initial_correction)

◆ recent_times

list bombardelli_test.recent_times = [times[i] + time * (times[-1] - times[0] - times[i]) / (times[-1] - times[0]) for time in times]

◆ recent_values_1

list bombardelli_test.recent_values_1 = [gamma(k - q) / gamma(k + 1) * (f(t - k * h + a) - f(t)) for k in range(N + 1)]

◆ recent_values_2

list bombardelli_test.recent_values_2 = [(- 1) ** k * gamma(q + 1) / (gamma(k + 1) * gamma(q - k + 1)) * (f(t - (k - 0.5 * q) * h + a) - f(a) - linear_correction_option * (t - (k - 0.5 * q) * h) * initial_approx_deriv) for k in range(N)]

◆ t

list bombardelli_test.t = times[- 1]

◆ t_win

list bombardelli_test.t_win = times[0] + 0.5 * times[- 1]

◆ times

list bombardelli_test.times = [dt * i for i in range(n_steps)]

◆ values

list bombardelli_test.values = [gamma(k - q) / gamma(k + 1) * f(t - k * h) for k in range(N)]