-
Notifications
You must be signed in to change notification settings - Fork 755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1D shallow water #1844
Comments
This is my code ,the results are incorrect; they seem to be unaffected by the terrain. def Slope(x): Slope_x 函数:支持 PyTorch 张量def Slope_x(x): still water heightdef sth(x): Define bottom topographydef get_bottom(bottom_name):
def _swe(bottom_name, g, source_term=True):
def on_initial(_, on_initial): def boundary(_, on_boundary): def boundary_l(x, on_boundary): def boundary_r(x, on_boundary): def func_ic_h(X): def _transform_output(U0): def func_ic_u(x): def func_bc_h1(X): def func_bc_h2(X): def func_bc_u1(X): def func_bc_h2(X):if isinstance(X, np.ndarray): # 检查输入是否为 numpy.ndarrayX = torch.tensor(X, dtype=torch.float32)H = ref_value[30, :]print(H)return Hmodel partgeom = dde.geometry.Interval(xmin, xmax) IC_h = dde.IC(geomtime, func_ic_h, on_initial, component=0) IC_u = dde.IC(geomtime, func_ic_u, on_initial, component=1) BC_h1 = dde.DirichletBC(geomtime, func_bc_h1, boundary_l, component=0) BC_h3 = dde.icbc.PointSetBC(12.5, ref_value[:, 37])BC_u1 = dde.DirichletBC(geomtime, func_bc_u1, boundary_l, component=1) BC = [IC_h, IC_u, BC_h1, BC_h2, BC_u1] |
Can DeepXDE simulate wave propagation under a submerged breakwater terrain controlled by a 1D shallow water equation PDE? I am looking forward to your reply.
The text was updated successfully, but these errors were encountered: