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

📄 matrix_times_vector.c

📁 计算一般形式弹性张量最优化TI近似的C程序 Computing the optimal TI approximation of a general elastic tensor
💻 C
字号:
/* * Copyright (c) 2005 by the Society of Exploration Geophysicists. * For more information, go to http://software.seg.org/2005/0001 . * You must read and accept usage terms at: * http://software.seg.org/disclaimer.txt before use. * * Revision history: * Original SEG version by Joe Dellinger, BP EPTG, July 2005. */#include <math.h>#include "cmat.h"/* * Multiply a matrix times a vector: * outvec = rmat * invec * * Input: 3-vector invec *        3x3 matrix rmat * Output: 3-vector outvec * * Author Joe Dellinger, Amoco TTC, 19 Feb 1997. */voidmatrix_times_vector (FLT_DBL * outvec, FLT_DBL * rmat, FLT_DBL * invec){int             ii, jj;double          temp;    for (ii = 0; ii < 3; ii++)    {	temp = 0.;	for (jj = 0; jj < 3; jj++)	{	    temp += RMAT (jj, ii) * invec[jj];	}	outvec[ii] = temp;    }    return;}

⌨️ 快捷键说明

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