CalculiX  2.8 A Free Software Three-Dimensional Structural Finite Element Program
prediction_em.c File Reference
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include "CalculiX.h"
Include dependency graph for prediction_em.c:

Go to the source code of this file.

## Functions

void prediction_em (double *uam, ITG *nmethod, double *bet, double *gam, double *dtime, ITG *ithermal, ITG *nk, double *veold, double *v, ITG *iinc, ITG *idiscon, double *vold, ITG *nactdof, ITG *mi)

## Function Documentation

 void prediction_em ( double * uam, ITG * nmethod, double * bet, double * gam, double * dtime, ITG * ithermal, ITG * nk, double * veold, double * v, ITG * iinc, ITG * idiscon, double * vold, ITG * nactdof, ITG * mi )

Definition at line 33 of file prediction_em.c.

36  {
37
38  ITG j,k,mt=mi[1]+1,jstart;
39  double dextrapol;
40
41  uam[0]=0.;
42  uam[1]=0.;
43
44  if(*ithermal<2){
45  jstart=1;
46  }else{
47  jstart=0;
48  }
49
50  if(*nmethod==4){
51  for(k=0;k<*nk;++k){
52  for(j=jstart;j<mt;j++){
53  dextrapol=*dtime*veold[mt*k+j];
54  if(fabs(dextrapol)>100.) dextrapol=100.*dextrapol/fabs(dextrapol);
55  if(j==0){
56  if((fabs(dextrapol)>uam[1])&&(nactdof[mt*k]>0)) {uam[1]=fabs(dextrapol);}
57  }
58  v[mt*k+j]=vold[mt*k+j]+dextrapol;
59  }
60  }
61  }
62
63  /* for the static case: extrapolation of the previous increment
64  (if any within the same step) */
65
66  else{
67  if(*iinc>1){
68  for(k=0;k<*nk;++k){
69  for(j=jstart;j<mt;j++){
70  if(*idiscon==0){
71  dextrapol=*dtime*veold[mt*k+j];
72  if(fabs(dextrapol)>100.) dextrapol=100.*dextrapol/fabs(dextrapol);
73  if(j==0){
74  if((fabs(dextrapol)>uam[1])&&(nactdof[mt*k]>0)) {uam[1]=fabs(dextrapol);}
75  }
76  v[mt*k+j]=vold[mt*k+j]+dextrapol;
77  }else{
78  v[mt*k+j]=vold[mt*k+j];
79  }
80  }
81  }
82  }
83  else{
84  for(k=0;k<*nk;++k){
85  for(j=jstart;j<mt;j++){
86  v[mt*k+j]=vold[mt*k+j];
87  }
88  }
89  }
90  }
91  *idiscon=0;
92
93  return;
94 }
#define ITG
Definition: CalculiX.h:51
Hosted by OpenAircraft.com, (Michigan UAV, LLC)