资源简介
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个文件信息
相关资源
- 条码字体barcode128
- pscad近海风电模型 Fortran语言
- 弹塑性力学Fortran算例
- STM32蓝牙和串口程序
- 通风网络解算程序 fortran90
- UNICODE GBK双向码表二进制文件
- 常用编码(UnicodeUTF-8GBK)转换工具
- vc URL编解码类
- 中文转化unicoder码的方法
- Fortran常用算法程序集-徐士良(配套程
- 大气科学常用FORTRAN程序
- 地固系惯性系坐标转换程序
- codesys编程手册中文版
- XSS Encode
- LHC生命周期前沿的非弹性暗物质:A
- arm cortex m0 rtl code
- Xcode 12.3(16F156)安装包.zip
- windows 64位系统下安装Code Warrior6.3方法
- Zxing-Code_128一维码
- CODE128A 字体
- Code 128 字体
- INBarcodeOCR条码识别组件,识别率及速
- code39条形码字体
- 飞思卡尔68HC08Metrowerks_CodeWarrior开发软
- codewarrior使用指南中文版
- Code Warrior License 破解,各个版本可用
- Codewarrior HCS12 V5.1 license
- codewarrior6.3 win10环境可以安装的破解
- Codesys变成入门手册
- patchedcode.bin
评论
共有 条评论