surfload.cpp
来自「Finite element program for mechanical pr」· C++ 代码 · 共 49 行
CPP
49 行
#include "surfload.h"#include "intools.h"#include "mathem.h"#include <math.h>/** This constructor initializes data to the zero values*/surfload::surfload(){ f = NULL; nlc = 0; lgcs = 0; ndir = 0;}/** This destructor deallocates used memory*/surfload::~surfload(){ delete [] f;}/** This function reads data about surface load from the text file given by the parameter in Parameters : @param in - pointer to the opned text file @param lc - total number of load cases Returns : @retval 0 - on succes*/long surfload::read(FILE *in, long lc){ getlong(in, nlc); if ((nlc < 1) || (nlc > lc)) return(2); long i; getlong(in, lgcs); getlong(in, ndir); f = new double [ndir]; for (i = 0; i < ndir; i++) getdouble(in, f[i]); return(0);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?