read_matrix.c
来自「计算一般形式弹性张量最优化TI近似的C程序 Computing the o」· C语言 代码 · 共 40 行
C
40 行
/* * 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 "cmat.h"#include <stdio.h>/* * Read a stiffness matrix from standard input. * * Output: * cc is a 6x6 elastic stiffness matrix read from standard input. * * Author Joe Dellinger, Amoco TTC, 19 Feb 1997. */voidread_matrix_6x6 (FLT_DBL * cc){int ii, jj; for (ii = 0; ii < 6; ii++) for (jj = 0; jj < 6; jj++) {#ifdef DOUBLE_PRECISION scanf ("%lf", &CC (ii, jj));#else scanf ("%f", &CC (ii, jj));#endif } return;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?