📄 igridgeo.h
字号:
#include <stdio.h>
#define OK 0
#define FILE_ERROR 1
#define WRONGSIGNATURE 2
#define OUTOFMEM 3
#define NCELLUNKNOWN 4
#define NSIDEUNKNOWN 5
#define NNODEUNKNOWN 6
#define GEO_ERROR 7
#define NO_DELIMITOR 8
#define GEOSIGNATURE "IGRIDGeometry1.00"
#define KW_UNIT "Unit{"
#define KW_NCELL "nCell{"
#define KW_NSIDE "nSide{"
#define KW_NNODE "nNode{"
#define KW_CELL "Cell{"
#define KW_SIDE "Side{"
#define KW_NODE "Node{"
struct igridgeo{
double unit;
unsigned int ncell;
unsigned int nside;
unsigned int nnode;
struct cell *cell;
struct side *side;
struct node *node;
};
struct cell{
unsigned int type;
double property1, property2, property3, property4;
unsigned int side[4];
};
struct side{
unsigned int property;
unsigned int node[2];
unsigned int cell[2];
};
struct node{
unsigned int property;
double x, y;
};
int readgeometry(char *, struct igridgeo *);
int checksignature(char *);
int readunit(FILE *, struct igridgeo *);
int readncell(FILE *, struct igridgeo *);
int readnside(FILE *, struct igridgeo *);
int readnnode(FILE *, struct igridgeo *);
int readcell(FILE *, struct igridgeo *);
int readside(FILE *, struct igridgeo *);
int readnode(FILE *, struct igridgeo *);
int updateside(struct igridgeo *, int, int);
int printgeometry(struct igridgeo *);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -