/* CalculiX - A 3-dimensional finite element program */ /* Copyright (C) 1998-2007 Guido Dhondt */ /* This program is free software; you can redistribute it and/or */ /* modify it under the terms of the GNU General Public License as */ /* published by the Free Software Foundation(version 2); */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include "CalculiX.h" #ifdef SPOOLES #include "spooles.h" #endif #ifdef SGI #include "sgi.h" #endif #ifdef TAUCS #include "tau.h" #endif void calcresidual(int *nmethod, int *neq, double *b, double *fext, double *f, int *iexpl, int *nactdof, double *aux1, double *aux2, double *vold, double *vini, double *dtime, double *accold, int *nk, double *adb, double *aub, int *icol, int *irow, int *nzl, double *alpha, double *fextini, double *fini){ int k,kk; double scal1; /* residual for a static analysis */ if(*nmethod!=4){ for(k=0;k