def fortran_src_wrapper(solver,state,dt): """ Wraps Fortran src2.f routine. src2.f contains the discretization of the source term. """ # Some simplifications grid = state.grid # Get parameters and variables that have to be passed to the fortran src2 # routine. mx, my = grid.num_cells[0], grid.num_cells[1] num_ghost = solver.num_ghost xlower, ylower = grid.lower[0], grid.lower[1] dx, dy = grid.delta[0], grid.delta[1] q = state.q aux = state.aux t = state.t # Call src2 function state.q = problem.src2(mx,my,num_ghost,xlower,ylower,dx,dy,q,aux,t,dt,Rsphere)
def fortran_src_wrapper(solver,state,dt): """ Wraps Fortran src2.f routine. src2.f contains the discretization of the source term. """ # Some simplifications grid = state.grid # Get parameters and variables that have to be passed to the fortran src2 # routine. mx, my = grid.ng[0], grid.ng[1] meqn = state.meqn mbc = solver.mbc xlowerg, ylowerg = grid.lowerg[0], grid.lowerg[1] dx, dy = grid.d[0], grid.d[1] q = state.q t = state.t maux = state.maux aux = state.aux # Call src2 function import problem state.q = problem.src2(mx,my,mbc,xlowerg,ylowerg,dx,dy,q,aux,t,dt,Rsphere)