Peano
Loading...
Searching...
No Matches
DSL_test.py
Go to the documentation of this file.
1from exahypype import kernel as xhpp
2import numpy as np
3
4test = xhpp(dim=2,patch_size=4,namespace="exahype2::fv::rusanov::internal")
5dt = 0.01
6
7Qcopy = test.Evaluate("Qcopy", "Q[]")
8
9xnum = test.halo([1,0])
10ynum = test.halo([0,1])
11
12XFlux = test.Evaluate("flux_x", "Flux_x(Qcopy[],kwargs)", xnum)
13YFlux = test.Evaluate("flux_y", "Flux_y(Qcopy[],kwargs)", ynum)
14
15XEig = test.Evaluate("tmp_x_eigen", "X_max_eigenvalues(Qcopy[],kwargs)", xnum)
16YEig = test.Evaluate("tmp_y_eigen", "Y_max_eigenvalues(Qcopy[],kwargs)", ynum)
17
18test.Stencil(Qcopy,[XFlux,YFlux],"0[010],0[0-10],1[001],1[00-1]",dt*np.array([1,-1,1,-1]))
19test.Stencil(Qcopy,[XEig,YEig],"0[010],0[0-10],1[001],1[00-1]",[0.5,0.5,0.5,0.5])
20
21const*max(XEign[i],[i+1])*(Q[i]-Q[i+1])
22const*max(XEign[i],[i-1])*(Q[i]-Q[i-1])
23
24
25