📄 floats.h
字号:
/* * Copyright (c) 2001-2004 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 * *//* floats.h Falk Feddersen */ #ifndef FLOATS_H /* DEFS_H */#define FLOATS_H#include "bdefs.h"typedef enum { RANDOM_FLOATS, FILE_FLOATS, POINT_FLOATS, NO_FLOATS} floats_init_t;typedef struct { switch_t floats_flag; floats_init_t floatinit; GString *floats_file; int nfloats; double x0, y0; } floats_info_t;#define NTIMELEVELS 2 /* this is from ROMS */typedef struct { int nfloats; double *xlocall[NTIMELEVELS]; double *ylocall[NTIMELEVELS]; double *uvelall[NTIMELEVELS]; double *vvelall[NTIMELEVELS];; double *xloc_nfp; /* future time level x & y location -> points to an array in xlocall */ double *yloc_nfp; double *xloc_nf; /* current time level x & y location, points to array in xlocall */ double *yloc_nf; double *xloc_nfm1; /* n-1 time level x & y location, points to array in xlocall */ double *yloc_nfm1; double *xloc_nfm2; /* n-2 time level x & y location, points to array in xlocall */ double *yloc_nfm2; double *xloc_nfm3; /* n-3 time level x & y location, points to array in xlocall */ double *yloc_nfm3; double *uvel_nfp; double *vvel_nfp; double *uvel_nf; double *vvel_nf; double *uvel; double *vvel; double *xloc; double *yloc; } floats_t;extern floats_t Floats;extern switch_t floats_flag;void init_floats(floats_info_t *floats_info);void free_floats();void floats_report(floats_info_t *FL);void update_floats_AB2(const field2D *UU, const field2D *VV, double dt);void update_floats_euler(const field2D *UU, const field2D *VV, double dt);void load_floats_info(GString *float_file);//void save_float_info();#endif /* FLOATS_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -