lattice.c

来自「基于格子Boltzmann方法开源可视化软件的源代码 具有很高的实用价值。对学」· C语言 代码 · 共 59 行

C
59
字号
//##############################################################################//// Copyright (C), 2005, Michael Sukop and Danny Thorne//// lattice.c//// Accessor functions for members of the data structure in lattice.h//int get_LX( lattice_ptr lattice) { return lattice->param.LX;}int get_LY( lattice_ptr lattice) { return lattice->param.LY;}int get_si( lattice_ptr lattice) { return 0;}int get_sj( lattice_ptr lattice) { return 0;}int get_ei( lattice_ptr lattice) { return lattice->param.LX-1;}int get_ej( lattice_ptr lattice) { return lattice->param.LY-1;}int get_NumFrames( lattice_ptr lattice) { return lattice->param.NumFrames;}int get_FrameRate( lattice_ptr lattice) { return lattice->param.FrameRate;}double *get_ftemp_ptr( lattice_ptr lattice, int subs, int j, int i, int a){  return (double *)(lattice->pdf[subs]->ftemp + IJ2N(i,j));}int get_time( lattice_ptr lattice) { return lattice->time;}int get_slice_x( lattice_ptr lattice) { return lattice->param.slice_x;}int get_slice_y( lattice_ptr lattice) { return lattice->param.slice_y;}#if INAMURO_SIGMA_COMPONENTint get_bc_sigma_walls( lattice_ptr lattice)    { return lattice->param.bc_sigma_walls;}#endif /* (INAMURO_SIGMA_COMPONENT) */int get_buoyancy( lattice_ptr lattice)   { return lattice->param.buoyancy;}int get_buoyancy_flag( lattice_ptr lattice)   { return ( lattice->param.buoyancy!=0)?(1):(0); }int get_buoyancy_sign( lattice_ptr lattice)   { return ( lattice->param.buoyancy!=0)          ?((lattice->param.buoyancy>0)?(1):(-1))          :(0); }int use_slice_dot_in_file( lattice_ptr lattice){  if( get_slice_x(lattice) < 0 && get_slice_y(lattice) < 0)  {    return 1;  }  else  {    return 0;  }} /* int use_slice_dot_in_file( lattice_ptr lattice) */

⌨️ 快捷键说明

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