⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rt_sha_real.c

📁 su 的源代码库
💻 C
字号:
/* Copyright (c) Colorado School of Mines, 2006.*//* All rights reserved.                       *//* Copyright (c) Colorado School of Mines, 1999.*//* All rights reserved.                       */#include "par.h"#include "elastic.h"int rt_SHa_real(float c1212i, float c2323i, float c1223i, float c1212t, 	float c2323t, float c1223t, float pxi, float pzi, float pxt, 	float pzt, float pxr, float pzr, int rort, float *coeff, float gz, 		float gx)/*****************************************************************************Reflection/Transmission coeff for SH propagation in anisotropic media******************************************************************************Input:cijkli		stiffness (incident side)cijklt		stiffness (transmitted side)pxi,pzi		incidence slownesspxt,pzt		transmitted slownesspxr,pzr		reflected slownessgz,gx		sin/cos of interfacerort		=0 transmission		=1 reflection		=2 free surface******************************************************************************Output:-1		error in routine1		coefficient found*coeff		adress of real refl/transm coeff******************************************************************************Author: Andreas Rueger, Colorado School of Mines, 02/01/94******************************************************************************/{	float rcoeff,d;		rotvector (&pxt,&pzt,gz,gx);	rotvector (&pxi,&pzi,gz,gx);	rotvector (&pxr,&pzr,gz,gx);	rottensh (&c1212i,&c2323i,&c1223i,gz,gx);	rottensh (&c1212t,&c2323t,&c1223t,gz,gx);	/* free surface reflection */	if(rort == 2){		d = c1223i*pxr + c2323i* pzr;		if (ABS(d) < FLT_EPSILON)			return -1;		*coeff = -( c1223i*pxi + c2323i* pzi)/d ;		return 1;			} else {		d = c1223i*pxr + c2323i*pzr - c1223t*pxt - c2323t*pzt;		if (ABS(d) < FLT_EPSILON)			return -1;		rcoeff = (c1223t*pxt + c2323t*pzt - c1223i*pxi - c2323i*pzi)/d;		/* reflection */		if(rort == 1)			*coeff = rcoeff;		/* transmission */		else if(rort ==0 )			*coeff = rcoeff + 1;		else 			err(" wrong rort in int rt_SHa_real");	}	return 1;}

⌨️ 快捷键说明

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