CalculiX  2.8
A Free Software Three-Dimensional Structural Finite Element Program
 All Classes Files Functions Variables Macros
calcresidual_em.c File Reference
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include "CalculiX.h"
Include dependency graph for calcresidual_em.c:

Go to the source code of this file.

Functions

void calcresidual_em (ITG *nmethod, ITG *neq, double *b, double *fext, double *f, ITG *iexpl, ITG *nactdof, double *aux1, double *aux2, double *vold, double *vini, double *dtime, double *accold, ITG *nk, double *adb, double *aub, ITG *jq, ITG *irow, ITG *nzl, double *alpha, double *fextini, double *fini, ITG *islavnode, ITG *nslavnode, ITG *mortar, ITG *ntie, double *f_cm, double *f_cs, ITG *mi, ITG *nzs, ITG *nasym, ITG *ithermal)
 

Function Documentation

void calcresidual_em ( ITG nmethod,
ITG neq,
double *  b,
double *  fext,
double *  f,
ITG iexpl,
ITG nactdof,
double *  aux1,
double *  aux2,
double *  vold,
double *  vini,
double *  dtime,
double *  accold,
ITG nk,
double *  adb,
double *  aub,
ITG jq,
ITG irow,
ITG nzl,
double *  alpha,
double *  fextini,
double *  fini,
ITG islavnode,
ITG nslavnode,
ITG mortar,
ITG ntie,
double *  f_cm,
double *  f_cs,
ITG mi,
ITG nzs,
ITG nasym,
ITG ithermal 
)

Definition at line 33 of file calcresidual_em.c.

39  {
40 
41  ITG j,k,mt=mi[1]+1,jstart;
42 
43  /* residual for a static analysis */
44 
45  if(*nmethod!=4){
46  for(k=0;k<neq[1];++k){
47  b[k]=fext[k]-f[k];
48  }
49  }
50 
51  /* residual for implicit dynamics */
52 
53  else{
54 
55  if(*ithermal<2){
56  jstart=1;
57  }else{
58  jstart=0;
59  }
60 
61  /* calculating a pseudo-velocity */
62 
63  for(k=0;k<*nk;++k){
64  for(j=jstart;j<mt;++j){
65  if(nactdof[mt*k+j]!=0){aux2[nactdof[mt*k+j]-1]=(vold[mt*k+j]-vini[mt*k+j])/(*dtime);}
66  }
67  }
68 
69  /* calculating "capacity"-matrix times pseudo-velocity */
70 
71  if(*nasym==0){
72  FORTRAN(op,(&neq[1],aux2,b,adb,aub,jq,irow));
73  }else{
74  FORTRAN(opas,(&neq[1],aux2,b,adb,aub,jq,irow,nzs));
75  }
76 
77  for(k=0;k<neq[1];++k){
78  b[k]=fext[k]-f[k]-b[k];
79  }
80  }
81 
82  return;
83 }
void FORTRAN(addimdnodecload,(ITG *nodeforc, ITG *i, ITG *imdnode, ITG *nmdnode, double *xforc, ITG *ikmpc, ITG *ilmpc, ITG *ipompc, ITG *nodempc, ITG *nmpc, ITG *imddof, ITG *nmddof, ITG *nactdof, ITG *mi, ITG *imdmpc, ITG *nmdmpc, ITG *imdboun, ITG *nmdboun, ITG *ikboun, ITG *nboun, ITG *ilboun, ITG *ithermal))
subroutine op(n, x, y, ad, au, jq, irow)
Definition: op.f:25
subroutine opas(n, x, y, ad, au, jq, irow, nzs)
Definition: opas.f:25
#define ITG
Definition: CalculiX.h:51
Hosted by OpenAircraft.com, (Michigan UAV, LLC)