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

Go to the source code of this file.

Functions

void inicont (ITG *nk, ITG *ncont, ITG *ntie, char *tieset, ITG *nset, char *set, ITG *istartset, ITG *iendset, ITG *ialset, ITG **itietrip, char *lakon, ITG *ipkon, ITG *kon, ITG **koncontp, ITG *nslavs, double *tietol, ITG *ismallsliding, ITG **itiefacp, ITG **islavsurfp, ITG **islavnodep, ITG **imastnodep, ITG **nslavnodep, ITG **nmastnodep, ITG *mortar, ITG **imastopp, ITG *nkon, ITG **iponoelsp, ITG **inoelsp, ITG **ipep, ITG **imep, ITG *ne, ITG *ifacecount, 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, double *co, ITG *istep, double **xnoelsp)
 

Function Documentation

void inicont ( ITG nk,
ITG ncont,
ITG ntie,
char *  tieset,
ITG nset,
char *  set,
ITG istartset,
ITG iendset,
ITG ialset,
ITG **  itietrip,
char *  lakon,
ITG ipkon,
ITG kon,
ITG **  koncontp,
ITG nslavs,
double *  tietol,
ITG ismallsliding,
ITG **  itiefacp,
ITG **  islavsurfp,
ITG **  islavnodep,
ITG **  imastnodep,
ITG **  nslavnodep,
ITG **  nmastnodep,
ITG mortar,
ITG **  imastopp,
ITG nkon,
ITG **  iponoelsp,
ITG **  inoelsp,
ITG **  ipep,
ITG **  imep,
ITG ne,
ITG ifacecount,
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,
double *  co,
ITG istep,
double **  xnoelsp 
)

Definition at line 24 of file inicont.c.

36  {
37 
38  char kind1[2]="C",kind2[2]="-",*tchar1=NULL,*tchar3=NULL,*labmpc=NULL;
39 
40  ITG *itietri=NULL,*koncont=NULL,*itiefac=NULL, *islavsurf=NULL,im,
41  *islavnode=NULL,*imastnode=NULL,*nslavnode=NULL,*nmastnode=NULL,
42  nmasts,*ipe=NULL,*ime=NULL,*imastop=NULL,
43  *iponoels=NULL,*inoels=NULL,ifreenoels,ifreeme,*ipoface=NULL,
44  *nodface=NULL,iface,*ipompc=NULL,*ikmpc=NULL,
45  *ilmpc=NULL,*nodempc=NULL,nmpc_,i,j,k,ncone;
46 
47  double *fmpc=NULL,*coefmpc=NULL,*xnoels=NULL;
48 
49  itietri=*itietrip;koncont=*koncontp;itiefac=*itiefacp;islavsurf=*islavsurfp;
50  islavnode=*islavnodep;imastnode=*imastnodep;nslavnode=*nslavnodep;
51  nmastnode=*nmastnodep;imastop=*imastopp,iponoels=*iponoelsp;
52  inoels=*inoelsp;ipe=*ipep;ime=*imep;xnoels=*xnoelsp;
53 
54  ipompc=*ipompcp;labmpc=*labmpcp;ikmpc=*ikmpcp;ilmpc=*ilmpcp;
55  fmpc=*fmpcp;nodempc=*nodempcp;coefmpc=*coefmpcp;
56  nmpc_=*nmpc;
57 
58  /* determining the number of slave entities (nodes or faces, ncone),
59  and the number of master triangles (ncont) */
60 
61  FORTRAN(allocont,(ncont,ntie,tieset,nset,set,istartset,iendset,
62  ialset,lakon,&ncone,tietol,ismallsliding,kind1,kind2,mortar,
63  istep));
64  if(*ncont==0) return;
65 
66  NNEW(itietri,ITG,2**ntie);
67  NNEW(koncont,ITG,4**ncont);
68 
69  /* triangulation of the master side */
70 
71  FORTRAN(triangucont,(ncont,ntie,tieset,nset,set,istartset,iendset,
72  ialset,itietri,lakon,ipkon,kon,koncont,kind1,kind2,co,nk));
73 
74  NNEW(ipe,ITG,*nk);
75  NNEW(ime,ITG,12**ncont);
76  DMEMSET(ipe,0,*nk,0.);
77  DMEMSET(ime,0,12**ncont,0.);
78  NNEW(imastop,ITG,3**ncont);
79 
80  FORTRAN(trianeighbor,(ipe,ime,imastop,ncont,koncont,
81  &ifreeme));
82 
83  if(*mortar==0){SFREE(ipe);SFREE(ime);}
84  else{RENEW(ime,ITG,4*ifreeme);}
85 
86  /* catalogueing the external faces (only for node-to-face
87  contact with a nodal slave surface */
88 
89  NNEW(ipoface,ITG,*nk);
90  NNEW(nodface,ITG,5*6**ne);
91  FORTRAN(findsurface,(ipoface,nodface,ne,ipkon,kon,lakon,ntie,
92  tieset));
93 
94  NNEW(itiefac,ITG,2**ntie);
95  RENEW(islavsurf,ITG,2*6**ne);DMEMSET(islavsurf,0,12**ne,0);
96  NNEW(islavnode,ITG,8*ncone);
97  NNEW(nslavnode,ITG,*ntie+1);
98  NNEW(iponoels,ITG,*nk);
99  NNEW(inoels,ITG,2**nkon);
100  NNEW(xnoels,double,*nkon);
101 
102  NNEW(imastnode,ITG,3**ncont);
103  NNEW(nmastnode,ITG,*ntie+1);
104 
105  /* catalogueing the slave faces and slave nodes
106  catalogueing the master nodes (only for Mortar contact) */
107 
108  FORTRAN(tiefaccont,(lakon,ipkon,kon,ntie,tieset,nset,set,
109  istartset,iendset,ialset,itiefac,islavsurf,islavnode,
110  imastnode,nslavnode,nmastnode,nslavs,&nmasts,ifacecount,
111  iponoels,inoels,&ifreenoels,mortar,ipoface,nodface,nk,
112  xnoels));
113 
114  RENEW(islavsurf,ITG,2**ifacecount+2);
115  RENEW(islavnode,ITG,*nslavs);
116  RENEW(inoels,ITG,2*ifreenoels);
117  RENEW(xnoels,double,ifreenoels);
118  SFREE(ipoface);SFREE(nodface);
119 
120  RENEW(imastnode,ITG,nmasts);
121 
122  *itietrip=itietri;*koncontp=koncont;
123  *itiefacp=itiefac;*islavsurfp=islavsurf;
124  *islavnodep=islavnode;*imastnodep=imastnode;
125  *nslavnodep=nslavnode;*nmastnodep=nmastnode;
126  *imastopp=imastop;*iponoelsp=iponoels;*inoelsp=inoels;
127  *ipep=ipe;*imep=ime;*xnoelsp=xnoels;
128 
129  *ipompcp=ipompc;*labmpcp=labmpc;*ikmpcp=ikmpc;*ilmpcp=ilmpc;
130  *fmpcp=fmpc;*nodempcp=nodempc;*coefmpcp=coefmpc;
131 
132  return;
133 }
subroutine triangucont(ncont, ntie, tieset, nset, set, istartset, iendset, ialset, itietri, lakon, ipkon, kon, koncont, kind1, kind2, co, nk)
Definition: triangucont.f:19
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 tiefaccont(lakon, ipkon, kon, ntie, tieset, nset, set, istartset, iendset, ialset, itiefac, islavsurf, islavnode, imastnode, nslavnode, nmastnode, nslavs, nmasts, ifacecount, iponoels, inoels, ifreenoels, mortar, ipoface, nodface, nk, xnoels)
Definition: tiefaccont.f:19
#define DMEMSET(a, b, c, d)
Definition: CalculiX.h:45
#define RENEW(a, b, c)
Definition: CalculiX.h:40
#define SFREE(a)
Definition: CalculiX.h:41
subroutine trianeighbor(ipe, ime, imastop, ncont, koncont, ifreeme)
Definition: trianeighbor.f:19
subroutine allocont(ncont, ntie, tieset, nset, set, istartset, iendset, ialset, lakon, ncone, tietol, ismallsliding, kind1, kind2, mortar, istep)
Definition: allocont.f:19
subroutine findsurface(ipoface, nodface, ne, ipkon, kon, lakon, ntie, tieset)
Definition: findsurface.f:19
#define ITG
Definition: CalculiX.h:51
#define NNEW(a, b, c)
Definition: CalculiX.h:39
Hosted by OpenAircraft.com, (Michigan UAV, LLC)