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.
Classes | Functions | Variables
ode_solve Namespace Reference

Classes

class  Grid1D
 
class  FEM_coefficient_matrix_generator
 
class  FEM_load_vector_generator
 
class  ode_solve
 

Functions

def solve (A, rhs)
 
def load (f)
 
def assemble (d, k, ikt1, ikt2, M1, M2, D1, D2, D0)
 
def mult (A, x)
 
def mult_transpose (A, x)
 
def quadrature_points_local (order)
 
def quadrature_weights_local (order)
 

Variables

int L = lambda z : z + 1
 
int dLdz = lambda z : z**0
 
int t = 0
 
int dof = 2**10
 
float domain_height = 0.9
 
tuple grid = (np.linspace(0,domain_height,dof)/domain_height)**2 *domain_height
 
int d = 1
 
int k1 = 1
 
int k2 = 1
 
int n = 2
 manufactured solution and derivatives (u=0 at z=0 dudz=0 at z=domain_height) More...
 
tuple const = (n + 1/2)*np.pi/domain_height
 
 psi = lambda z : np.sin(const*z)
 
tuple dpsidz = lambda z : const*np.cos(const*z)
 
tuple d2psidz2 = lambda z : -const**2*np.sin(const*z)
 
 f
 
 kappa = np.vectorize(lambda z: L(z)**2)
 
 ode_solve_inst = ode_solve(dof, kappa, domain_height=domain_height, grid=grid)
 
 psi_approx = ode_solve_inst(d, f, k1, k2, t=t)
 
 z = np.linspace(0,domain_height,len(psi_approx))
 

Function Documentation

◆ assemble()

def ode_solve.assemble (   d,
  k,
  ikt1,
  ikt2,
  M1,
  M2,
  D1,
  D2,
  D0 
)

◆ load()

def ode_solve.load (   f)

◆ mult()

def ode_solve.mult (   A,
  x 
)

◆ mult_transpose()

def ode_solve.mult_transpose (   A,
  x 
)

◆ quadrature_points_local()

def ode_solve.quadrature_points_local (   order)

◆ quadrature_weights_local()

def ode_solve.quadrature_weights_local (   order)

◆ solve()

def ode_solve.solve (   A,
  rhs 
)

Variable Documentation

◆ const

tuple ode_solve.const = (n + 1/2)*np.pi/domain_height

◆ d

int ode_solve.d = 1

◆ d2psidz2

tuple ode_solve.d2psidz2 = lambda z : -const**2*np.sin(const*z)

◆ dLdz

int ode_solve.dLdz = lambda z : z**0

◆ dof

int ode_solve.dof = 2**10

◆ domain_height

float ode_solve.domain_height = 0.9

◆ dpsidz

tuple ode_solve.dpsidz = lambda z : const*np.cos(const*z)

◆ f

ode_solve.f
Initial value:
1 = lambda z : ((d + 1.0 + L(z)**2*(1.0+t**2)*k1**2 + L(z)**2*k2**2 - 2j*t*L(z)*dLdz(z)*k1)*psi(z)
2  - 2.0*(1j*t*L(z)**2*k1 + L(z)*dLdz(z))*dpsidz(z) - L(z)**2*d2psidz2(z))
tuple dpsidz
Definition: ode_solve.py:405
tuple d2psidz2
Definition: ode_solve.py:406
psi
Definition: ode_solve.py:404
int L
Definition: ode_solve.py:390
int dLdz
Definition: ode_solve.py:391

◆ grid

tuple ode_solve.grid = (np.linspace(0,domain_height,dof)/domain_height)**2 *domain_height

◆ k1

int ode_solve.k1 = 1

◆ k2

int ode_solve.k2 = 1

◆ kappa

ode_solve.kappa = np.vectorize(lambda z: L(z)**2)

◆ L

int ode_solve.L = lambda z : z + 1

◆ n

int ode_solve.n = 2

manufactured solution and derivatives (u=0 at z=0 dudz=0 at z=domain_height)

◆ ode_solve_inst

ode_solve.ode_solve_inst = ode_solve(dof, kappa, domain_height=domain_height, grid=grid)

◆ psi

ode_solve.psi = lambda z : np.sin(const*z)

◆ psi_approx

ode_solve.psi_approx = ode_solve_inst(d, f, k1, k2, t=t)

◆ t

int ode_solve.t = 0

◆ z

tuple ode_solve.z = np.linspace(0,domain_height,len(psi_approx))