📄 depth.h
字号:
/* * Copyright (c) 2001-2005 Falk Feddersen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *//* depth.h Falk Feddersen */ #ifndef DEPTH_H#define DEPTH_H#include "bdefs.h"typedef enum { FLAT, PLANAR, HFILE1D, HFILE2D} depth_t;typedef struct { depth_t dtype; gdouble h0, slope; // units of MKS please!! GString *depth_file;} depthinfo;typedef struct { field2D *H; // This is the actual mean depth on an extended ETA grid field2D *HBX; // averaged x-shore bathymetry on U grid field2D *HBY; // averaged y-shore bathymetry on V grid field2D *HBXY; // averaged x- and y - shore and alongshore bathymetry on VORT grid field2D *ZA; // ZA = -0.531*H field2D *DEPTH; // This is the (h+\eta) depth on an extended ETA grid field2D *DEPTHBX; // averaged x-shore (h+\eta) bathymetry on U grid field2D *DEPTHBY; // averaged y-shore (h+\eta) bathymetry on V grid field2D *DEPTHBXY; // averaged x- and y - (h+\eta) shore and alongshore bathymetry on VORT grid} field2D_depth_var;extern field2D_depth_var *Depth_Vars;void init_depth_variables(depthinfo *D, int nx, int ny);void deallocate_depth_variables();void set_planar_depth(gdouble slope, gdouble h0, gdouble dx, field2D *H);void set_constant_depth(gdouble depth, field2D *H);void load_line_bathymetry(char *fname, field2D *H);void load_full_bathymetry(char *fname, field2D *H);double check_depth(const field2D *ETA); /* checks to make sure that h+eta > 0, returns the minimum total water depth */void report_mass_conservation(const field2D *ETA); /* prints out \int \eta dx dy */ #endif /* DEPTH_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -