grid.h.old

来自「this a Navier-Stokes equations solver. I」· OLD 代码 · 共 55 行

OLD
55
字号
#ifndef _FLOW_GRID_H_
#define _FLOW_GRID_H_

#include <list>
#include <vector>
#include <float.h>

using namespace std;

struct pos{
	float x;
	float y;
	int index;
};

struct node{
	float density;
	float term;
	float vx;
	float vy;
};

class grid{
public:
	//grid();
	//grid(const pos &s, const pos &e,const float w);
	//~grid();

	// geometry config
	int start, end;
	float rad;
	// numeric simulation grid
	node *array;
	int width;
	int height;
	// neighbors
	grid** streams;
};

class mech{
public:
	//mech();
	//~mech();
	
	int read_file(const char *filename);
	int update_grids(const list<grid> &g,const vector<pos> &v);

	float dx, dy;
	pos *vertexes;
	int vertexes_count;
	grid *grids;
	int grids_count;
};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?