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

Go to the source code of this file.

Functions

void contact (ITG *ncont, ITG *ntie, char *tieset, ITG *nset, char *set, ITG *istartset, ITG *iendset, ITG *ialset, ITG *itietri, char *lakon, ITG *ipkon, ITG *kon, ITG *koncont, ITG *ne, double *cg, double *straight, ITG *ifree, double *co, double *vold, ITG *ielmat, double *cs, double *elcon, ITG *istep, ITG *iinc, ITG *iit, ITG *ncmat_, ITG *ntmat_, ITG *ne0, double *vini, ITG *nmethod, ITG *nmpc, ITG *mpcfree, ITG *memmpc_, ITG **ipompcp, char **labmpcp, ITG **ikmpcp, ITG **ilmpcp, double **fmpcp, ITG **nodempcp, double **coefmpcp, ITG *iperturb, ITG *ikboun, ITG *nboun, ITG *mi, ITG *imastop, ITG *nslavnode, ITG *islavnode, ITG *islavsurf, ITG *itiefac, double *areaslav, ITG *iponoels, ITG *inoels, double *springarea, double *tietol, double *reltime, ITG *imastnode, ITG *nmastnode, double *xmastnor, char *filab, ITG *mcs, ITG *ics, ITG *nasym, double *xnoels, ITG *mortar, double *pslavsurf, double *pmastsurf, double *clearini, double *theta)
 

Function Documentation

void contact ( ITG ncont,
ITG ntie,
char *  tieset,
ITG nset,
char *  set,
ITG istartset,
ITG iendset,
ITG ialset,
ITG itietri,
char *  lakon,
ITG ipkon,
ITG kon,
ITG koncont,
ITG ne,
double *  cg,
double *  straight,
ITG ifree,
double *  co,
double *  vold,
ITG ielmat,
double *  cs,
double *  elcon,
ITG istep,
ITG iinc,
ITG iit,
ITG ncmat_,
ITG ntmat_,
ITG ne0,
double *  vini,
ITG nmethod,
ITG nmpc,
ITG mpcfree,
ITG memmpc_,
ITG **  ipompcp,
char **  labmpcp,
ITG **  ikmpcp,
ITG **  ilmpcp,
double **  fmpcp,
ITG **  nodempcp,
double **  coefmpcp,
ITG iperturb,
ITG ikboun,
ITG nboun,
ITG mi,
ITG imastop,
ITG nslavnode,
ITG islavnode,
ITG islavsurf,
ITG itiefac,
double *  areaslav,
ITG iponoels,
ITG inoels,
double *  springarea,
double *  tietol,
double *  reltime,
ITG imastnode,
ITG nmastnode,
double *  xmastnor,
char *  filab,
ITG mcs,
ITG ics,
ITG nasym,
double *  xnoels,
ITG mortar,
double *  pslavsurf,
double *  pmastsurf,
double *  clearini,
double *  theta 
)

Definition at line 23 of file contact.c.

40  {
41 
42  char *labmpc=NULL;
43 
44  ITG i,ntrimax,*nx=NULL,*ny=NULL,*nz=NULL,*ipompc=NULL,*ikmpc=NULL,
45  *ilmpc=NULL,*nodempc=NULL,nmpc_,im;
46 
47  double *xo=NULL,*yo=NULL,*zo=NULL,*x=NULL,*y=NULL,*z=NULL,
48  *fmpc=NULL, *coefmpc=NULL;
49 
50  ipompc=*ipompcp;labmpc=*labmpcp;ikmpc=*ikmpcp;ilmpc=*ilmpcp;
51  fmpc=*fmpcp;nodempc=*nodempcp;coefmpc=*coefmpcp;
52  nmpc_=*nmpc;
53 
54  /* next call is only for node-to-face penalty contact
55  setting up bordering planes for the master triangles;
56  these planes are common between neighboring traingles */
57 
58  if(*mortar==0){
59 
60  DMEMSET(xmastnor,0,3*nmastnode[*ntie],0.);
61 
62  FORTRAN(updatecontpen,(koncont,ncont,co,vold,
63  cg,straight,mi,imastnode,nmastnode,xmastnor,
64  ntie,tieset,nset,set,istartset,
65  iendset,ialset,ipkon,lakon,kon,cs,mcs,ics));
66  }
67 
68  /* determining the size of the auxiliary fields */
69 
70  ntrimax=0;
71  for(i=0;i<*ntie;i++){
72  if(itietri[2*i+1]-itietri[2*i]+1>ntrimax)
73  ntrimax=itietri[2*i+1]-itietri[2*i]+1;
74  }
75  NNEW(xo,double,ntrimax);
76  NNEW(yo,double,ntrimax);
77  NNEW(zo,double,ntrimax);
78  NNEW(x,double,ntrimax);
79  NNEW(y,double,ntrimax);
80  NNEW(z,double,ntrimax);
81  NNEW(nx,ITG,ntrimax);
82  NNEW(ny,ITG,ntrimax);
83  NNEW(nz,ITG,ntrimax);
84 
85  if(*mortar==0){
86 
87  FORTRAN(gencontelem_n2f,(tieset,ntie,itietri,ne,ipkon,kon,lakon,
88  cg,straight,ifree,koncont,
89  co,vold,xo,yo,zo,x,y,z,nx,ny,nz,ielmat,elcon,istep,
90  iinc,iit,ncmat_,ntmat_,nmethod,mi,
91  imastop,nslavnode,islavnode,islavsurf,itiefac,areaslav,iponoels,
92  inoels,springarea,
93  set,nset,istartset,iendset,ialset,tietol,reltime,
94  imastnode,nmastnode,filab,nasym,xnoels));
95 
96  }else if(*mortar==1){
97 
98  FORTRAN(gencontelem_f2f,(tieset,ntie,itietri,ne,ipkon,kon,
99  lakon,cg,straight,ifree,koncont,co,vold,xo,yo,zo,x,y,z,nx,ny,nz,
100  ielmat,elcon,istep,iinc,iit,ncmat_,ntmat_,mi,imastop,islavsurf,
101  itiefac,springarea,tietol,reltime,filab,nasym,pslavsurf,pmastsurf,
102  clearini,theta));
103 
104  }
105 
106  SFREE(xo);SFREE(yo);SFREE(zo);SFREE(x);SFREE(y);SFREE(z);SFREE(nx);
107  SFREE(ny);SFREE(nz);
108 
109  *ipompcp=ipompc;*labmpcp=labmpc;*ikmpcp=ikmpc;*ilmpcp=ilmpc;
110  *fmpcp=fmpc;*nodempcp=nodempc;*coefmpcp=coefmpc;
111 
112  return;
113 }
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 updatecontpen(koncont, ncont, co, vold, cg, straight, mi, imastnode, nmastnode, xmastnor, ntie, tieset, nset, set, istartset, iendset, ialset, ipkon, lakon, kon, cs, mcs, ics)
Definition: updatecontpen.f:19
#define DMEMSET(a, b, c, d)
Definition: CalculiX.h:45
subroutine gencontelem_f2f(tieset, ntie, itietri, ne, ipkon, kon, lakon, cg, straight, ifree, koncont, co, vold, xo, yo, zo, x, y, z, nx, ny, nz, ielmat, elcon, istep, iinc, iit, ncmat_, ntmat_, mi, imastop, islavsurf, itiefac, springarea, tietol, reltime, filab, nasym, pslavsurf, pmastsurf, clearini, theta)
Definition: gencontelem_f2f.f:19
#define SFREE(a)
Definition: CalculiX.h:41
subroutine gencontelem_n2f(tieset, ntie, itietri, ne, ipkon, kon, lakon, cg, straight, ifree, koncont, co, vold, xo, yo, zo, x, y, z, nx, ny, nz, ielmat, elcon, istep, iinc, iit, ncmat_, ntmat_, nmethod, mi, imastop, nslavnode, islavnode, islavsurf, itiefac, areaslav, iponoels, inoels, springarea, set, nset, istartset, iendset, ialset, tietol, reltime, imastnode, nmastnode, filab, nasym, xnoels)
Definition: gencontelem_n2f.f:19
#define ITG
Definition: CalculiX.h:51
#define NNEW(a, b, c)
Definition: CalculiX.h:39
Hosted by OpenAircraft.com, (Michigan UAV, LLC)