资源简介
Fortran语言的计算流体力学源代码!
代码片段和文件信息
#include
#include “diom_globals.h“
#include “diom_procedures.h“
void diatom_point_test2 ( REAL *x REAL *y REAL *z REAL *dr REAL *value
INTEGER *ival )
{
/*
DIATOM_POINT_TEST2
Discussion:
This is a modified version of DIATOM_POINT_TEST as supplied by David
Crawford. In this version the arguments X Y Z and DR are pointers.
This facilitates calling the routine from FORTRAN.
This routine functions as an interface between higher level FORTRAN
routines and the DIATOM library which is written primarily in C.
Modified:
12 April 2001
Parameters:
Input REAL *X *Y *Z pointers to the (XYZ) coordinates of a point.
Input REAL *DR pointer to a tolerance used when determining if a
point is in on or outside the region.
Input REAL *VALUE pointer to an output quantity a material density
to be computed by this routine.
Input INTEGER *IVAL pointer to an output quantity an index to be
computed by this routine which is 1 if the point (XYZ) is in the
region -1 if it is on the boundary of the region and 0 if it is
outside the region.
*/
static struct diom *curr_diom;
struct geom_object *curr_geom;
REAL dt = 0;
INTEGER i;
int init = 1;
REAL io;
INTEGER kbad;
INTEGER mat_id;
REAL *mmtmp;
REAL time = 0;
REAL tmp;
REAL vf;
REAL vf_all;
REAL x1;
REAL x2;
REAL y1;
REAL y2;
REAL z1;
REAL z2;
/* printf ( “DIATOM_POINT_TEST2: xyz = %f %f %f.\n“ *x *y *z ); */
/* printf ( “DIATOM_POINT_TEST2: dr = %f.\n“ *dr ); */
x1 = *x - *dr;
y1 = *y - *dr;
z1 = *z - *dr;
x2 = *x + *dr;
y2 = *y + *dr;
z2 = *z + *dr;
curr_diom = head_diom;
if ( curr_diom != NULL ) {
curr_geom = curr_diom->geom_list;
} else {
*ival = 0;
printf ( “\n“ );
printf ( “DIATOM_POINT_TEST2: Bad News!\n“ );
printf ( “ The data structure is not set up.\n“ );
return;
}
vf_all=0;
*value=0;
while (curr_diom != NULL) {
vf=0;
if (((init == 1) && (curr_diom->off == time)) ||
((init == 1) && (curr_diom->off < time) && (curr_diom->speed == 0)) ||
((init == 1) && (curr_diom->anywhere == 2)) ||
((init == 0) && (time+dt >= curr_diom->on) && (time < curr_diom->off))) {
if (diom_brick_VF != NULL) {
if ((curr_diom->anywhere == 1) || ((curr_diom->anywhere == 2) && (init == 1)) ||
(in_ureg(number_dimensionsx1 y1 z1 x2 y2 z2) != 0)) {
curr_geom = curr_diom->geom_list;
while (curr_geom != NULL) {
mmtmp = curr_geom->minmax;
if ((mmtmp[0]x1) &&
(((mmtmp[1]y1)) || (number_dimensions<2)) &&
(((mmtmp[2]z1)) || (number_dimensions<3))) {
/*curr_geom->GSUB(curr_geom->G&curr_geom->NGxyzdrdrdr&io);
vf += curr_geom->VFADD*fabs(io);*/
vf += curr_geom->VFADD*diom_brick_VF(curr_geom x1 y1 z1 x2 y2 z2 0);
if (curr_diom->IP[1] < 2) {
if (vf < 0.0) vf = 0.0;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 6544 2010-12-16 07:10 yiweipenguan.f90
文件 124585 2010-12-16 07:36 cvt_basis\cvt_basis.f90
文件 838 2010-12-16 07:36 cvt_basis\cvt_run_01.inp
文件 10727 2010-12-16 07:36 cvt_basis\cvt_run_01.out
文件 280 2010-12-16 07:36 cvt_basis\raw.txt
文件 152 2010-12-16 07:36 cvt_basis\gnuplot_raw.inp
文件 12506 2010-12-16 07:36 cvt_basis\raw.eps
文件 280 2010-12-16 07:36 cvt_basis\raw2.txt
文件 155 2010-12-16 07:36 cvt_basis\gnuplot_raw2.inp
文件 12746 2010-12-16 07:36 cvt_basis\raw2.eps
文件 800 2010-12-16 07:37 cvt_basis\cvt_run_02.inp
文件 5944 2010-12-16 07:37 cvt_basis\cvt_run_02.out
文件 48749 2010-12-16 07:37 cvt_basis\gen_001.txt
文件 48749 2010-12-16 07:37 cvt_basis\gen_002.txt
文件 48749 2010-12-16 07:37 cvt_basis\gen_003.txt
文件 48749 2010-12-16 07:37 cvt_basis\gen_004.txt
文件 48749 2010-12-16 07:37 cvt_basis\gen_005.txt
文件 48749 2010-12-16 07:37 cvt_basis\gen_006.txt
文件 48749 2010-12-16 07:37 cvt_basis\gen_007.txt
文件 48749 2010-12-16 07:37 cvt_basis\gen_008.txt
文件 1075 2010-12-16 07:37 cvt_basis\cvt_run_03.inp
文件 5107 2010-12-16 07:37 cvt_basis\cvt_run_03.out
文件 82345 2010-12-16 07:34 cvt\cvt.f90
文件 14799 2010-12-16 07:34 cvt\cvt_main.f90
文件 4857 2010-12-16 07:34 cvt\diatom_setup.c
文件 279 2010-12-16 07:34 cvt\diatom_test.in
文件 3711 2010-12-16 07:34 cvt\diatom_point_test2.c
文件 5080 2010-12-16 07:34 cvt\diom_globals.h
文件 7667 2010-12-16 07:34 cvt\diom_procedures.h
文件 2057 2010-12-16 07:34 cvt\cvt_01.out
文件 2127 2010-12-16 07:34 cvt\cvt_02.out
............此处省略73个文件信息
相关资源
- freeScale codeWarrior IDE 教程(包含网上的
- star ccm入门
- libmp3lame(3.100)_iOS静态库支持arm64v
- zw_code-CSS3.zip
- zw_ScanCodeDemo.zip
- ANSYS 14.5 ICEM CFD Tutorial Manual.pdf
- 有限元方法编程及fortran程序__第三版
- Mazes for Programmers Code Your Own Twisty Lit
- gocode.exe、guru.exe、godef.exe
- zipDecoder.zip
- MediaCodec解码H264视频数据
- code-基于视频分析的火焰检测方法
- Codecs6030_allin1.exe
- 数据结构黄国瑜 叶乃菁pdf ppt code
- CodeCompare 代码对比 附破解工具
- 数值传热学
- CEC2014测试函数及相应函数解释说明
- 12*1216*16完整点阵字库包含所有unicod
- Django 2 by Example_Code 源码
- Leda42SourceCode
- Intel_Visual_Fortran_Compiler10.1破解文件
- seismic analysis code
- VcodeExtractor插件开发——用于验证码识
-
neural_st
yle_tutoria_code&papers.zip - Odin Inspector Source Code 2.1.4.unitypackage
- CodeBlocks 17.12 汉化补丁-v5.2.6
- 最实用、最详细的Xcode4.3开发第一个
- xcode 最新安装包 ios 11.2
- FFDShow MPEG-4 Video Decoder 2008 03.20
- QuartzCode破解
评论
共有 条评论