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

Go to the source code of this file.

Functions

void mafillsmmain (double *co, ITG *nk, ITG *kon, ITG *ipkon, char *lakon, ITG *ne, ITG *nodeboun, ITG *ndirboun, double *xboun, ITG *nboun, ITG *ipompc, ITG *nodempc, double *coefmpc, ITG *nmpc, ITG *nodeforc, ITG *ndirforc, double *xforc, ITG *nforc, ITG *nelemload, char *sideload, double *xload, ITG *nload, double *xbody, ITG *ipobody, ITG *nbody, double *cgr, double *ad, double *au, double *fext, ITG *nactdof, ITG *icol, ITG *jq, ITG *irow, ITG *neq, ITG *nzl, ITG *nmethod, ITG *ikmpc, ITG *ilmpc, ITG *ikboun, ITG *ilboun, double *elcon, ITG *nelcon, double *rhcon, ITG *nrhcon, double *alcon, ITG *nalcon, double *alzero, ITG *ielmat, ITG *ielorien, ITG *norien, double *orab, ITG *ntmat_, double *t0, double *t1, ITG *ithermal, double *prestr, ITG *iprestr, double *vold, ITG *iperturb, double *sti, ITG *nzs, double *stx, double *adb, double *aub, ITG *iexpl, double *plicon, ITG *nplicon, double *plkcon, ITG *nplkcon, double *xstiff, ITG *npmat_, double *dtime, char *matname, ITG *mi, ITG *ncmat_, ITG *mass, ITG *stiffness, ITG *buckling, ITG *rhsi, ITG *intscheme, double *physcon, double *shcon, ITG *nshcon, double *cocon, ITG *ncocon, double *ttime, double *time, ITG *istep, ITG *iinc, ITG *coriolis, ITG *ibody, double *xloadold, double *reltime, double *veold, double *springarea, ITG *nstate_, double *xstateini, double *xstate, double *thicke, ITG *integerglob, double *doubleglob, char *tieset, ITG *istartset, ITG *iendset, ITG *ialset, ITG *ntie, ITG *nasym, double *pslavsurf, double *pmastsurf, ITG *mortar, double *clearini, ITG *ielprop, double *prop, ITG *ne0, double *fnext, ITG *kscale, ITG *iponoel, ITG *inoel, ITG *network)
 
void * mafillsmmt (ITG *i)
 

Variables

static char * lakon1
 
static char * sideload1
 
static char * matname1
 
static char * tieset1
 
static ITGnk1
 
static ITGkon1
 
static ITGipkon1
 
static ITGne1
 
static ITGnodeboun1
 
static ITGndirboun1
 
static ITGnboun1
 
static ITGipompc1
 
static ITGnodempc1
 
static ITGnmpc1
 
static ITGnodeforc1
 
static ITGndirforc1
 
static ITGnforc1
 
static ITGnelemload1
 
static ITGnload1
 
static ITGipobody1
 
static ITGnbody1
 
static ITGnactdof1
 
static ITGicol1
 
static ITGjq1
 
static ITGirow1
 
static ITGneq1
 
static ITGnzl1
 
static ITGnmethod1 =NULL
 
static ITGikmpc1
 
static ITGilmpc1
 
static ITGikboun1
 
static ITGilboun1
 
static ITGnelcon1
 
static ITGnrhcon1
 
static ITGnalcon1
 
static ITGielmat1
 
static ITGielorien1
 
static ITGnorien1
 
static ITGntmat1_
 
static ITGithermal1
 
static ITGiprestr1
 
static ITGiperturb1
 
static ITGnzs1
 
static ITGiexpl1
 
static ITGnplicon1
 
static ITGnplkcon1
 
static ITGnpmat1_
 
static ITGmi1
 
static ITGncmat1_
 
static ITGmass1
 
static ITGstiffness1
 
static ITGbuckling1
 
static ITGrhsi1
 
static ITGintscheme1
 
static ITGnshcon1
 
static ITGncocon1
 
static ITGistep1
 
static ITGiinc1
 
static ITGcoriolis1
 
static ITGibody1
 
static ITGnstate1_
 
static ITGintegerglob1
 
static ITGistartset1
 
static ITGiendset1
 
static ITGialset1
 
static ITGntie1
 
static ITGnasym1
 
static ITGmortar1
 
static ITGielprop1
 
static ITGne01
 
static ITG num_cpus
 
static ITGkscale1
 
static ITGiponoel1
 
static ITGinoel1
 
static ITGnetwork1
 
static double * co1
 
static double * xboun1
 
static double * coefmpc1
 
static double * xforc1
 
static double * xload1
 
static double * xbody1
 
static double * cgr1
 
static double * ad1 =NULL
 
static double * au1 =NULL
 
static double * fext1 =NULL
 
static double * elcon1
 
static double * rhcon1
 
static double * alcon1
 
static double * alzero1
 
static double * orab1
 
static double * t01
 
static double * t11
 
static double * prestr1
 
static double * vold1
 
static double * sti1
 
static double * stx1
 
static double * adb1 =NULL
 
static double * aub1 =NULL
 
static double * plicon1
 
static double * plkcon1
 
static double * xstiff1
 
static double * dtime1
 
static double * physcon1
 
static double * shcon1
 
static double * cocon1
 
static double * ttime1
 
static double * time1
 
static double * xloadold1
 
static double * reltime1
 
static double * veold1
 
static double * springarea1
 
static double * xstateini1
 
static double * xstate1
 
static double * thicke1
 
static double * doubleglob1
 
static double * pslavsurf1
 
static double * pmastsurf1
 
static double * clearini1
 
static double * prop1
 
static double * fnext1 =NULL
 

Function Documentation

◆ mafillsmmain()

void mafillsmmain ( double *  co,
ITG nk,
ITG kon,
ITG ipkon,
char *  lakon,
ITG ne,
ITG nodeboun,
ITG ndirboun,
double *  xboun,
ITG nboun,
ITG ipompc,
ITG nodempc,
double *  coefmpc,
ITG nmpc,
ITG nodeforc,
ITG ndirforc,
double *  xforc,
ITG nforc,
ITG nelemload,
char *  sideload,
double *  xload,
ITG nload,
double *  xbody,
ITG ipobody,
ITG nbody,
double *  cgr,
double *  ad,
double *  au,
double *  fext,
ITG nactdof,
ITG icol,
ITG jq,
ITG irow,
ITG neq,
ITG nzl,
ITG nmethod,
ITG ikmpc,
ITG ilmpc,
ITG ikboun,
ITG ilboun,
double *  elcon,
ITG nelcon,
double *  rhcon,
ITG nrhcon,
double *  alcon,
ITG nalcon,
double *  alzero,
ITG ielmat,
ITG ielorien,
ITG norien,
double *  orab,
ITG ntmat_,
double *  t0,
double *  t1,
ITG ithermal,
double *  prestr,
ITG iprestr,
double *  vold,
ITG iperturb,
double *  sti,
ITG nzs,
double *  stx,
double *  adb,
double *  aub,
ITG iexpl,
double *  plicon,
ITG nplicon,
double *  plkcon,
ITG nplkcon,
double *  xstiff,
ITG npmat_,
double *  dtime,
char *  matname,
ITG mi,
ITG ncmat_,
ITG mass,
ITG stiffness,
ITG buckling,
ITG rhsi,
ITG intscheme,
double *  physcon,
double *  shcon,
ITG nshcon,
double *  cocon,
ITG ncocon,
double *  ttime,
double *  time,
ITG istep,
ITG iinc,
ITG coriolis,
ITG ibody,
double *  xloadold,
double *  reltime,
double *  veold,
double *  springarea,
ITG nstate_,
double *  xstateini,
double *  xstate,
double *  thicke,
ITG integerglob,
double *  doubleglob,
char *  tieset,
ITG istartset,
ITG iendset,
ITG ialset,
ITG ntie,
ITG nasym,
double *  pslavsurf,
double *  pmastsurf,
ITG mortar,
double *  clearini,
ITG ielprop,
double *  prop,
ITG ne0,
double *  fnext,
ITG kscale,
ITG iponoel,
ITG inoel,
ITG network 
)
80  {
81 
82  ITG i,j,mt=mi[1]+1;
83 
84  /* variables for multithreading procedure */
85 
86  ITG sys_cpus,*ithread=NULL;
87  char *env,*envloc,*envsys;
88 
89  num_cpus = 0;
90  sys_cpus=0;
91 
92  /* explicit user declaration prevails */
93 
94  envsys=getenv("NUMBER_OF_CPUS");
95  if(envsys){
96  sys_cpus=atoi(envsys);
97  if(sys_cpus<0) sys_cpus=0;
98  }
99 
100 // sys_cpus=1;
101 
102  /* automatic detection of available number of processors */
103 
104  if(sys_cpus==0){
105  sys_cpus = getSystemCPUs();
106  if(sys_cpus<1) sys_cpus=1;
107  }
108 
109  /* local declaration prevails, if strictly positive */
110 
111  envloc = getenv("CCX_NPROC_STIFFNESS");
112  if(envloc){
113  num_cpus=atoi(envloc);
114  if(num_cpus<0){
115  num_cpus=0;
116  }else if(num_cpus>sys_cpus){
117  num_cpus=sys_cpus;
118  }
119 
120  }
121 
122  /* else global declaration, if any, applies */
123 
124  env = getenv("OMP_NUM_THREADS");
125  if(num_cpus==0){
126  if (env)
127  num_cpus = atoi(env);
128  if (num_cpus < 1) {
129  num_cpus=1;
130  }else if(num_cpus>sys_cpus){
131  num_cpus=sys_cpus;
132  }
133  }
134 
135 // next line is to be inserted in a similar way for all other paralell parts
136 
137  if(*ne<num_cpus) num_cpus=*ne;
138 
139  pthread_t tid[num_cpus];
140 
141  /* determine nzl */
142 
143  *nzl=0;
144  for(i=neq[1];i>=1;i--){
145  if(icol[i-1]>0){
146  *nzl=i;
147  break;
148  }
149  }
150 
151  /* allocating fields for mass and stiffness matrix */
152 
153 // if(*buckling!=1){
154  NNEW(ad1,double,num_cpus*neq[1]);
155  NNEW(au1,double,(long long)num_cpus*nzs[2]);
156 // }
157 
158  if(*rhsi==1){
159  NNEW(fext1,double,num_cpus*neq[1]);
160  }
161 
162  if((mass[1]==1)||((mass[0]==1)||(*buckling==1))){
163  NNEW(adb1,double,num_cpus*neq[1]);
164  NNEW(aub1,double,(long long)num_cpus*nzs[1]);
165  }
166 
167  if(*nmethod==4){
168  NNEW(fnext1,double,num_cpus*mt**nk);
169  }
170 
171  /* allocating memory for nmethod; if the Jacobian determinant
172  in any of the elements is nonpositive, nmethod is set to
173  zero */
174 
176  for(j=0;j<num_cpus;j++){
177  nmethod1[j]=*nmethod;
178  }
179 
180  /* calculating the stiffness and/or mass matrix
181  (symmetric part) */
182 
183  co1=co;nk1=nk;kon1=kon;ipkon1=ipkon;lakon1=lakon;ne1=ne;
184  nodeboun1=nodeboun;ndirboun1=ndirboun;xboun1=xboun;
185  nboun1=nboun;ipompc1=ipompc;nodempc1=nodempc;coefmpc1=coefmpc;
186  nmpc1=nmpc;nodeforc1=nodeforc;ndirforc1=ndirforc;xforc1=xforc;
187  nforc1=nforc;nelemload1=nelemload;sideload1=sideload;xload1=xload;
188  nload1=nload;xbody1=xbody;ipobody1=ipobody;nbody1=nbody;
189  cgr1=cgr;nactdof1=nactdof;icol1=icol;jq1=jq;irow1=irow;neq1=neq;
190  nzl1=nzl;ikmpc1=ikmpc;ilmpc1=ilmpc;ikboun1=ikboun;
191  ilboun1=ilboun;elcon1=elcon;nelcon1=nelcon;rhcon1=rhcon;
192  nrhcon1=nrhcon;alcon1=alcon;nalcon1=nalcon;alzero1=alzero;
193  ielmat1=ielmat;ielorien1=ielorien;norien1=norien;orab1=orab;
194  ntmat1_=ntmat_;t01=t0;t11=t1;ithermal1=ithermal;prestr1=prestr;
195  iprestr1=iprestr;vold1=vold;iperturb1=iperturb;sti1=sti;nzs1=nzs;
196  stx1=stx;iexpl1=iexpl;plicon1=plicon;nplicon1=nplicon;
197  plkcon1=plkcon;nplkcon1=nplkcon;xstiff1=xstiff;npmat1_=npmat_;
198  dtime1=dtime;matname1=matname;mi1=mi;ncmat1_=ncmat_;mass1=mass;
199  stiffness1=stiffness;buckling1=buckling;rhsi1=rhsi;intscheme1=intscheme;
200  physcon1=physcon;shcon1=shcon;nshcon1=nshcon;cocon1=cocon;
201  ncocon1=ncocon;ttime1=ttime;time1=time;istep1=istep;iinc1=iinc;
202  coriolis1=coriolis;ibody1=ibody;xloadold1=xloadold;reltime1=reltime;
203  veold1=veold;springarea1=springarea;nstate1_=nstate_;xstateini1=xstateini;
204  xstate1=xstate;thicke1=thicke;integerglob1=integerglob;
205  doubleglob1=doubleglob;tieset1=tieset;istartset1=istartset;
206  iendset1=iendset;ialset1=ialset;ntie1=ntie;nasym1=nasym;
207  pslavsurf1=pslavsurf;pmastsurf1=pmastsurf;mortar1=mortar;
208  clearini1=clearini;ielprop1=ielprop;prop1=prop;ne01=ne0;kscale1=kscale;
209  iponoel1=iponoel;inoel1=inoel;network1=network;
210 
211  /* calculating the stiffness/mass */
212 
213  printf(" Using up to %" ITGFORMAT " cpu(s) for the symmetric stiffness/mass contributions.\n\n", num_cpus);
214 
215  /* create threads and wait */
216 
217  NNEW(ithread,ITG,num_cpus);
218  for(i=0; i<num_cpus; i++) {
219  ithread[i]=i;
220  pthread_create(&tid[i], NULL, (void *)mafillsmmt, (void *)&ithread[i]);
221  }
222  for(i=0; i<num_cpus; i++) pthread_join(tid[i], NULL);
223 
224  SFREE(ithread);
225 
226  /* for(i=0;i<num_cpus;i++){
227  for(k=i*neq[1];k<i*neq[1]+neq[1];++k){printf("fext=%" ITGFORMAT ",%f\n",k-i*neq[1],fext1[k]);}
228  for(k=i*neq[1];k<i*neq[1]+neq[1];++k){printf("ad=%" ITGFORMAT ",%f\n",k-i*neq[1],ad1[k]);}
229  for(k=i*nzs[2];k<i*nzs[2]+nzs[2];++k){printf("au=%" ITGFORMAT ",%f\n",k-i*nzs[2],au1[k]);}
230  }*/
231 
232  /* copying and accumulating the stiffnes and/or mass matrix
233  for buckling the matrices have to be added*/
234 
235  if(*buckling!=1){
236 
237  /* no buckling */
238 
239  for(i=0;i<neq[1];i++){
240  ad[i]=ad1[i];
241  }
242  }else{
243 
244  /* buckling */
245 
246  for(i=0;i<neq[1];i++){
247  ad[i]+=ad1[i];
248  }
249  }
250 
251  for(i=0;i<neq[1];i++){
252  for(j=1;j<num_cpus;j++){
253  ad[i]+=ad1[i+j*neq[1]];
254  }
255  }
256  SFREE(ad1);
257 
258  if(*buckling!=1){
259 
260  /* no buckling */
261 
262  for(i=0;i<nzs[2];i++){
263  au[i]=au1[i];
264  }
265  }else{
266 
267  /* buckling */
268 
269  for(i=0;i<nzs[2];i++){
270  au[i]+=au1[i];
271  }
272  }
273 
274  for(i=0;i<nzs[2];i++){
275  for(j=1;j<num_cpus;j++){
276  au[i]+=au1[i+(long long)j*nzs[2]];
277  }
278  }
279  SFREE(au1);
280 
281  if(*rhsi==1){
282  for(i=0;i<neq[1];i++){
283  fext[i]=fext1[i];
284  }
285  for(i=0;i<neq[1];i++){
286  for(j=1;j<num_cpus;j++){
287  fext[i]+=fext1[i+j*neq[1]];
288  }
289  }
290  SFREE(fext1);
291  }
292 
293  /* the heat capacity matrix and mass matrix must be treated
294  separately, since the mass matrix is no recalculated
295  in each iteration, whereas the capacity matrix is */
296 
297  /* heat capacity matrix */
298 
299  if(mass[1]==1){
300  for(i=neq[0];i<neq[1];i++){
301  adb[i]=adb1[i];
302  }
303  for(i=neq[0];i<neq[1];i++){
304  for(j=1;j<num_cpus;j++){
305  adb[i]+=adb1[i+j*neq[1]];
306  }
307  }
308 
309  for(i=nzs[0];i<nzs[1];i++){
310  aub[i]=aub1[i];
311  }
312  for(i=nzs[0];i<nzs[1];i++){
313  for(j=1;j<num_cpus;j++){
314  aub[i]+=aub1[i+(long long)j*nzs[1]];
315  }
316  }
317  }
318 
319  /* mass matrix or buckling matrix */
320 
321  if((mass[0]==1)||(*buckling==1)){
322  for(i=0;i<neq[0];i++){
323  adb[i]=adb1[i];
324  }
325  for(i=0;i<neq[0];i++){
326  for(j=1;j<num_cpus;j++){
327  adb[i]+=adb1[i+j*neq[1]];
328  }
329  }
330 
331  for(i=0;i<nzs[0];i++){
332  aub[i]=aub1[i];
333  }
334  for(i=0;i<nzs[0];i++){
335  for(j=1;j<num_cpus;j++){
336  aub[i]+=aub1[i+(long long)j*nzs[1]];
337  }
338  }
339  }
340  if((mass[0]==1)||(mass[1]==1)||(*buckling==1)){
341  SFREE(adb1);SFREE(aub1);
342  }
343 
344  if(*nmethod==4){
345  for(i=0;i<mt**nk;i++){
346  fnext[i]=fnext1[i];
347  }
348  for(i=0;i<mt**nk;i++){
349  for(j=1;j<num_cpus;j++){
350  fnext[i]+=fnext1[i+j*mt**nk];
351  }
352  }
353  SFREE(fnext1);
354  }
355 
356  for(j=0;j<num_cpus;j++){
357  if(nmethod1[j]==0){
358  *nmethod=0;
359  break;
360  }
361  }
362  SFREE(nmethod1);
363 
364  /* for(k=0;k<neq[1];++k){printf("fext=%" ITGFORMAT ",%f\n",k,fext[k]);}
365  for(k=0;k<neq[1];++k){printf("ad=%" ITGFORMAT ",%f\n",k,ad[k]);}
366  for(k=0;k<nzs[1];++k){printf("au=%" ITGFORMAT ",%f\n",k,au[k]);}*/
367 
368  /* taking point forces into account in fext */
369 
370  FORTRAN(mafillsmforc,(nforc,ndirforc,nodeforc,xforc,nactdof,
371  fext,nmpc,ipompc,nodempc,ikmpc,ilmpc,
372  coefmpc,mi,rhsi,fnext,nmethod));
373 
374  return;
375 
376 }
static ITG * irow1
Definition: mafillsmmain.c:27
#define ITGFORMAT
Definition: CalculiX.h:52
static double * aub1
Definition: mafillsmmain.c:41
static ITG * iinc1
Definition: mafillsmmain.c:30
static char * lakon1
Definition: mafillsmmain.c:25
static ITG * nzl1
Definition: mafillsmmain.c:27
static ITG * ithermal1
Definition: mafillsmmain.c:30
static ITG * icol1
Definition: mafillsmmain.c:27
static ITG * iperturb1
Definition: mafillsmmain.c:30
static ITG * nk1
Definition: mafillsmmain.c:27
static double * prestr1
Definition: mafillsmmain.c:40
static double * xload1
Definition: mafillsmmain.c:39
int pthread_create(pthread_t *thread_id, const pthread_attr_t *attributes, void *(*thread_function)(void *), void *arguments)
subroutine mafillsmforc(nforc, ndirforc, nodeforc, xforc, nactdof, fext, nmpc, ipompc, nodempc, ikmpc, ilmpc, coefmpc, mi, rhsi, fnext, nmethod)
Definition: mafillsmforc.f:22
static double * dtime1
Definition: mafillsmmain.c:41
static ITG * ndirboun1
Definition: mafillsmmain.c:27
static ITG * intscheme1
Definition: mafillsmmain.c:30
static double * vold1
Definition: mafillsmmain.c:40
static ITG * istep1
Definition: mafillsmmain.c:30
static ITG * ielprop1
Definition: mafillsmmain.c:30
static ITG * nalcon1
Definition: mafillsmmain.c:30
static double * sti1
Definition: mafillsmmain.c:40
static double * xstateini1
Definition: mafillsmmain.c:41
static ITG * ndirforc1
Definition: mafillsmmain.c:27
static double * fnext1
Definition: mafillsmmain.c:45
static double * alcon1
Definition: mafillsmmain.c:40
void FORTRAN(actideacti,(char *set, ITG *nset, ITG *istartset, ITG *iendset, ITG *ialset, char *objectset, ITG *ipkon, ITG *ibject, ITG *ne))
static char * matname1
Definition: mafillsmmain.c:25
static ITG * ilboun1
Definition: mafillsmmain.c:30
static double * physcon1
Definition: mafillsmmain.c:41
static ITG * npmat1_
Definition: mafillsmmain.c:30
static ITG * mi1
Definition: mafillsmmain.c:30
static double * rhcon1
Definition: mafillsmmain.c:40
static ITG * ne01
Definition: mafillsmmain.c:30
static ITG * ipompc1
Definition: mafillsmmain.c:27
static ITG * nload1
Definition: mafillsmmain.c:27
static ITG * kon1
Definition: mafillsmmain.c:27
static ITG * nrhcon1
Definition: mafillsmmain.c:30
static ITG * ncmat1_
Definition: mafillsmmain.c:30
ITG getSystemCPUs()
Definition: getSystemCPUs.c:40
static ITG * nstate1_
Definition: mafillsmmain.c:30
static double * ttime1
Definition: mafillsmmain.c:41
static double * adb1
Definition: mafillsmmain.c:41
static ITG * iponoel1
Definition: mafillsmmain.c:30
static double * reltime1
Definition: mafillsmmain.c:41
static ITG * nmpc1
Definition: mafillsmmain.c:27
static ITG * nshcon1
Definition: mafillsmmain.c:30
static double * xstiff1
Definition: mafillsmmain.c:41
static ITG * ibody1
Definition: mafillsmmain.c:30
static double * springarea1
Definition: mafillsmmain.c:41
static ITG * nelcon1
Definition: mafillsmmain.c:30
static ITG * nodempc1
Definition: mafillsmmain.c:27
static double * xforc1
Definition: mafillsmmain.c:39
static double * thicke1
Definition: mafillsmmain.c:41
static double * veold1
Definition: mafillsmmain.c:41
static ITG * integerglob1
Definition: mafillsmmain.c:30
static double * co1
Definition: mafillsmmain.c:39
static ITG * nplicon1
Definition: mafillsmmain.c:30
static double * prop1
Definition: mafillsmmain.c:41
static ITG * ncocon1
Definition: mafillsmmain.c:30
static char * tieset1
Definition: mafillsmmain.c:25
static ITG * kscale1
Definition: mafillsmmain.c:30
static ITG * buckling1
Definition: mafillsmmain.c:30
static ITG * istartset1
Definition: mafillsmmain.c:30
static ITG * ilmpc1
Definition: mafillsmmain.c:30
#define SFREE(a)
Definition: CalculiX.h:41
static double * fext1
Definition: mafillsmmain.c:40
static ITG * nodeforc1
Definition: mafillsmmain.c:27
static double * pslavsurf1
Definition: mafillsmmain.c:41
static ITG * ipkon1
Definition: mafillsmmain.c:27
static ITG * nboun1
Definition: mafillsmmain.c:27
static ITG * ielorien1
Definition: mafillsmmain.c:30
static double * xboun1
Definition: mafillsmmain.c:39
static ITG * rhsi1
Definition: mafillsmmain.c:30
static ITG * ne1
Definition: mafillsmmain.c:27
static double * cocon1
Definition: mafillsmmain.c:41
void * mafillsmmt(ITG *i)
Definition: mafillsmmain.c:380
static double * elcon1
Definition: mafillsmmain.c:40
static ITG * ntmat1_
Definition: mafillsmmain.c:30
static ITG * neq1
Definition: mafillsmmain.c:27
static ITG * iendset1
Definition: mafillsmmain.c:30
static double * plicon1
Definition: mafillsmmain.c:41
static ITG * ikmpc1
Definition: mafillsmmain.c:30
static double * stx1
Definition: mafillsmmain.c:40
static double * orab1
Definition: mafillsmmain.c:40
static double * cgr1
Definition: mafillsmmain.c:39
static ITG * ikboun1
Definition: mafillsmmain.c:30
static ITG * nforc1
Definition: mafillsmmain.c:27
static double * ad1
Definition: mafillsmmain.c:40
static ITG * nplkcon1
Definition: mafillsmmain.c:30
static double * pmastsurf1
Definition: mafillsmmain.c:41
static ITG * inoel1
Definition: mafillsmmain.c:30
static double * xstate1
Definition: mafillsmmain.c:41
static double * t01
Definition: mafillsmmain.c:40
static ITG * nmethod1
Definition: mafillsmmain.c:30
static double * au1
Definition: mafillsmmain.c:40
static double * clearini1
Definition: mafillsmmain.c:41
static ITG * nactdof1
Definition: mafillsmmain.c:27
static double * doubleglob1
Definition: mafillsmmain.c:41
static ITG * ialset1
Definition: mafillsmmain.c:30
static ITG * mortar1
Definition: mafillsmmain.c:30
int pthread_join(pthread_t thread, void **status_ptr)
static ITG * norien1
Definition: mafillsmmain.c:30
static ITG * nelemload1
Definition: mafillsmmain.c:27
static double * time1
Definition: mafillsmmain.c:41
static ITG * nzs1
Definition: mafillsmmain.c:30
static double * t11
Definition: mafillsmmain.c:40
static double * shcon1
Definition: mafillsmmain.c:41
static double * coefmpc1
Definition: mafillsmmain.c:39
static ITG * stiffness1
Definition: mafillsmmain.c:30
static double * plkcon1
Definition: mafillsmmain.c:41
#define ITG
Definition: CalculiX.h:51
static ITG * mass1
Definition: mafillsmmain.c:30
static double * xloadold1
Definition: mafillsmmain.c:41
static ITG * coriolis1
Definition: mafillsmmain.c:30
static ITG * network1
Definition: mafillsmmain.c:30
static ITG * nasym1
Definition: mafillsmmain.c:30
static ITG * iexpl1
Definition: mafillsmmain.c:30
static ITG * ielmat1
Definition: mafillsmmain.c:30
static ITG num_cpus
Definition: mafillsmmain.c:30
static double * alzero1
Definition: mafillsmmain.c:40
#define NNEW(a, b, c)
Definition: CalculiX.h:39
static char * sideload1
Definition: mafillsmmain.c:25
static double * xbody1
Definition: mafillsmmain.c:39
static ITG * ntie1
Definition: mafillsmmain.c:30
static ITG * iprestr1
Definition: mafillsmmain.c:30
static ITG * ipobody1
Definition: mafillsmmain.c:27
static ITG * nodeboun1
Definition: mafillsmmain.c:27
static ITG * nbody1
Definition: mafillsmmain.c:27
static ITG * jq1
Definition: mafillsmmain.c:27

◆ mafillsmmt()

void* mafillsmmt ( ITG i)
380  {
381 
382  ITG indexad,indexfext,indexadb,nea,neb,nedelta,indexfnext;
383  long long indexau,indexaub;
384 
385  indexad=0;
386  indexau=0;
387  indexfext=0;
388  indexadb=0;
389  indexaub=0;
390  indexfnext=0;
391 
392 // if(*buckling1!=1){
393  indexad=*i*neq1[1];
394  indexau=(long long)*i*nzs1[2];
395 // }
396  if(*rhsi1==1){
397  indexfext=*i*neq1[1];
398  }
399  if(mass1[1]==1){
400  indexadb=*i*neq1[1];
401  indexaub=(long long)*i*nzs1[1];
402  }else if((mass1[0]==1)||(*buckling1==1)){
403  indexadb=*i*neq1[0];
404  indexaub=(long long)*i*nzs1[0];
405  }
406  if(nmethod1[0]==4){
407  indexfnext=*i*(mi1[1]+1)**nk1;
408  }
409 
410 
411  if((*nasym1==0)||(*ithermal1>1)){
412 
413  /* symmetric mechanical calculations or
414  thermal/thermomechanical calculations:
415  include contact elements (symmetric
416  thermal contributions are not covered by
417  mafillsmas.f) */
418 
419  nedelta=(ITG)floor(*ne1/(double)num_cpus);
420  nea=*i*nedelta+1;
421  neb=(*i+1)*nedelta;
422  if((*i==num_cpus-1)&&(neb<*ne1)) neb=*ne1;
423  }else{
424 
425  /* asymmetric mechanical calculations:
426  do not include contact elements */
427 
428  nedelta=(ITG)floor(*ne01/(double)num_cpus);
429  nea=*i*nedelta+1;
430  neb=(*i+1)*nedelta;
431  if((*i==num_cpus-1)&&(neb<*ne01)) neb=*ne01;
432  }
433 
434 
436  xboun1,nboun1,
439  nbody1,cgr1,&ad1[indexad],&au1[indexau],&fext1[indexfext],
440  nactdof1,icol1,jq1,irow1,neq1,nzl1,&nmethod1[*i],
445  nzs1,stx1,&adb1[indexadb],&aub1[indexaub],iexpl1,plicon1,
454  &fnext1[indexfnext],&nea,&neb,kscale1,iponoel1,inoel1,network1));
455 
456  return NULL;
457 }
static ITG * irow1
Definition: mafillsmmain.c:27
static double * aub1
Definition: mafillsmmain.c:41
static ITG * iinc1
Definition: mafillsmmain.c:30
static char * lakon1
Definition: mafillsmmain.c:25
static ITG * nzl1
Definition: mafillsmmain.c:27
static ITG * ithermal1
Definition: mafillsmmain.c:30
static ITG * icol1
Definition: mafillsmmain.c:27
static ITG * iperturb1
Definition: mafillsmmain.c:30
static ITG * nk1
Definition: mafillsmmain.c:27
subroutine mafillsm(co, nk, kon, ipkon, lakon, ne, nodeboun, ndirboun, xboun, nboun, ipompc, nodempc, coefmpc, nmpc, nodeforc, ndirforc, xforc, nforc, nelemload, sideload, xload, nload, xbody, ipobody, nbody, cgr, ad, au, fext, nactdof, icol, jq, irow, neq, nzl, nmethod, ikmpc, ilmpc, ikboun, ilboun, elcon, nelcon, rhcon, nrhcon, alcon, nalcon, alzero, ielmat, ielorien, norien, orab, ntmat_, t0, t1, ithermal, prestr, iprestr, vold, iperturb, sti, nzs, stx, adb, aub, iexpl, plicon, nplicon, plkcon, nplkcon, xstiff, npmat_, dtime, matname, mi, ncmat_, mass, stiffness, buckling, rhsi, intscheme, physcon, shcon, nshcon, cocon, ncocon, ttime, time, istep, iinc, coriolis, ibody, xloadold, reltime, veold, springarea, nstate_, xstateini, xstate, thicke, integerglob, doubleglob, tieset, istartset, iendset, ialset, ntie, nasym, pslavsurf, pmastsurf, mortar, clearini, ielprop, prop, ne0, fnext, nea, neb, kscale, iponoel, inoel, network)
Definition: mafillsm.f:36
static double * prestr1
Definition: mafillsmmain.c:40
static double * xload1
Definition: mafillsmmain.c:39
static double * dtime1
Definition: mafillsmmain.c:41
static ITG * ndirboun1
Definition: mafillsmmain.c:27
static ITG * intscheme1
Definition: mafillsmmain.c:30
static double * vold1
Definition: mafillsmmain.c:40
static ITG * istep1
Definition: mafillsmmain.c:30
static ITG * ielprop1
Definition: mafillsmmain.c:30
static ITG * nalcon1
Definition: mafillsmmain.c:30
static double * sti1
Definition: mafillsmmain.c:40
static double * xstateini1
Definition: mafillsmmain.c:41
static ITG * ndirforc1
Definition: mafillsmmain.c:27
static double * fnext1
Definition: mafillsmmain.c:45
static double * alcon1
Definition: mafillsmmain.c:40
void FORTRAN(actideacti,(char *set, ITG *nset, ITG *istartset, ITG *iendset, ITG *ialset, char *objectset, ITG *ipkon, ITG *ibject, ITG *ne))
static char * matname1
Definition: mafillsmmain.c:25
static ITG * ilboun1
Definition: mafillsmmain.c:30
static double * physcon1
Definition: mafillsmmain.c:41
static ITG * npmat1_
Definition: mafillsmmain.c:30
static ITG * mi1
Definition: mafillsmmain.c:30
static double * rhcon1
Definition: mafillsmmain.c:40
static ITG * ne01
Definition: mafillsmmain.c:30
static ITG * ipompc1
Definition: mafillsmmain.c:27
static ITG * nload1
Definition: mafillsmmain.c:27
static ITG * kon1
Definition: mafillsmmain.c:27
static ITG * nrhcon1
Definition: mafillsmmain.c:30
static ITG * ncmat1_
Definition: mafillsmmain.c:30
static ITG * nstate1_
Definition: mafillsmmain.c:30
static double * ttime1
Definition: mafillsmmain.c:41
static double * adb1
Definition: mafillsmmain.c:41
static ITG * iponoel1
Definition: mafillsmmain.c:30
static double * reltime1
Definition: mafillsmmain.c:41
static ITG * nmpc1
Definition: mafillsmmain.c:27
static ITG * nshcon1
Definition: mafillsmmain.c:30
static double * xstiff1
Definition: mafillsmmain.c:41
static ITG * ibody1
Definition: mafillsmmain.c:30
static double * springarea1
Definition: mafillsmmain.c:41
static ITG * nelcon1
Definition: mafillsmmain.c:30
static ITG * nodempc1
Definition: mafillsmmain.c:27
static double * xforc1
Definition: mafillsmmain.c:39
static double * thicke1
Definition: mafillsmmain.c:41
static double * veold1
Definition: mafillsmmain.c:41
static ITG * integerglob1
Definition: mafillsmmain.c:30
static double * co1
Definition: mafillsmmain.c:39
static ITG * nplicon1
Definition: mafillsmmain.c:30
static double * prop1
Definition: mafillsmmain.c:41
static ITG * ncocon1
Definition: mafillsmmain.c:30
static char * tieset1
Definition: mafillsmmain.c:25
static ITG * kscale1
Definition: mafillsmmain.c:30
static ITG * buckling1
Definition: mafillsmmain.c:30
static ITG * istartset1
Definition: mafillsmmain.c:30
static ITG * ilmpc1
Definition: mafillsmmain.c:30
static double * fext1
Definition: mafillsmmain.c:40
static ITG * nodeforc1
Definition: mafillsmmain.c:27
static double * pslavsurf1
Definition: mafillsmmain.c:41
static ITG * ipkon1
Definition: mafillsmmain.c:27
static ITG * nboun1
Definition: mafillsmmain.c:27
static ITG * ielorien1
Definition: mafillsmmain.c:30
static double * xboun1
Definition: mafillsmmain.c:39
static ITG * rhsi1
Definition: mafillsmmain.c:30
static ITG * ne1
Definition: mafillsmmain.c:27
static double * cocon1
Definition: mafillsmmain.c:41
static double * elcon1
Definition: mafillsmmain.c:40
static ITG * ntmat1_
Definition: mafillsmmain.c:30
static ITG * neq1
Definition: mafillsmmain.c:27
static ITG * iendset1
Definition: mafillsmmain.c:30
static double * plicon1
Definition: mafillsmmain.c:41
static ITG * ikmpc1
Definition: mafillsmmain.c:30
static double * stx1
Definition: mafillsmmain.c:40
static double * orab1
Definition: mafillsmmain.c:40
static double * cgr1
Definition: mafillsmmain.c:39
static ITG * ikboun1
Definition: mafillsmmain.c:30
static ITG * nforc1
Definition: mafillsmmain.c:27
static double * ad1
Definition: mafillsmmain.c:40
static ITG * nplkcon1
Definition: mafillsmmain.c:30
static double * pmastsurf1
Definition: mafillsmmain.c:41
static ITG * inoel1
Definition: mafillsmmain.c:30
static double * xstate1
Definition: mafillsmmain.c:41
static double * t01
Definition: mafillsmmain.c:40
static ITG * nmethod1
Definition: mafillsmmain.c:30
static double * au1
Definition: mafillsmmain.c:40
static double * clearini1
Definition: mafillsmmain.c:41
static ITG * nactdof1
Definition: mafillsmmain.c:27
static double * doubleglob1
Definition: mafillsmmain.c:41
static ITG * ialset1
Definition: mafillsmmain.c:30
static ITG * mortar1
Definition: mafillsmmain.c:30
static ITG * norien1
Definition: mafillsmmain.c:30
static ITG * nelemload1
Definition: mafillsmmain.c:27
static double * time1
Definition: mafillsmmain.c:41
static double * t11
Definition: mafillsmmain.c:40
static ITG * nzs1
Definition: mafillsmmain.c:30
static double * shcon1
Definition: mafillsmmain.c:41
static double * coefmpc1
Definition: mafillsmmain.c:39
static ITG * stiffness1
Definition: mafillsmmain.c:30
static double * plkcon1
Definition: mafillsmmain.c:41
#define ITG
Definition: CalculiX.h:51
static ITG * mass1
Definition: mafillsmmain.c:30
static double * xloadold1
Definition: mafillsmmain.c:41
static ITG * coriolis1
Definition: mafillsmmain.c:30
static ITG * network1
Definition: mafillsmmain.c:30
static ITG * nasym1
Definition: mafillsmmain.c:30
static ITG * iexpl1
Definition: mafillsmmain.c:30
static ITG * ielmat1
Definition: mafillsmmain.c:30
static ITG num_cpus
Definition: mafillsmmain.c:30
static double * alzero1
Definition: mafillsmmain.c:40
static char * sideload1
Definition: mafillsmmain.c:25
static double * xbody1
Definition: mafillsmmain.c:39
static ITG * ntie1
Definition: mafillsmmain.c:30
static ITG * iprestr1
Definition: mafillsmmain.c:30
static ITG * ipobody1
Definition: mafillsmmain.c:27
static ITG * nodeboun1
Definition: mafillsmmain.c:27
static ITG * nbody1
Definition: mafillsmmain.c:27
static ITG * jq1
Definition: mafillsmmain.c:27

Variable Documentation

◆ ad1

double * ad1 =NULL
static

◆ adb1

double * adb1 =NULL
static

◆ alcon1

double * alcon1
static

◆ alzero1

double * alzero1
static

◆ au1

double * au1 =NULL
static

◆ aub1

double * aub1 =NULL
static

◆ buckling1

ITG * buckling1
static

◆ cgr1

double * cgr1
static

◆ clearini1

double * clearini1
static

◆ co1

double* co1
static

◆ cocon1

double * cocon1
static

◆ coefmpc1

double * coefmpc1
static

◆ coriolis1

ITG * coriolis1
static

◆ doubleglob1

double * doubleglob1
static

◆ dtime1

double * dtime1
static

◆ elcon1

double * elcon1
static

◆ fext1

double * fext1 =NULL
static

◆ fnext1

double * fnext1 =NULL
static

◆ ialset1

ITG * ialset1
static

◆ ibody1

ITG * ibody1
static

◆ icol1

ITG * icol1
static

◆ ielmat1

ITG * ielmat1
static

◆ ielorien1

ITG * ielorien1
static

◆ ielprop1

ITG * ielprop1
static

◆ iendset1

ITG * iendset1
static

◆ iexpl1

ITG * iexpl1
static

◆ iinc1

ITG * iinc1
static

◆ ikboun1

ITG * ikboun1
static

◆ ikmpc1

ITG * ikmpc1
static

◆ ilboun1

ITG * ilboun1
static

◆ ilmpc1

ITG * ilmpc1
static

◆ inoel1

ITG * inoel1
static

◆ integerglob1

ITG * integerglob1
static

◆ intscheme1

ITG * intscheme1
static

◆ iperturb1

ITG * iperturb1
static

◆ ipkon1

ITG * ipkon1
static

◆ ipobody1

ITG * ipobody1
static

◆ ipompc1

ITG * ipompc1
static

◆ iponoel1

ITG * iponoel1
static

◆ iprestr1

ITG * iprestr1
static

◆ irow1

ITG * irow1
static

◆ istartset1

ITG * istartset1
static

◆ istep1

ITG * istep1
static

◆ ithermal1

ITG * ithermal1
static

◆ jq1

ITG * jq1
static

◆ kon1

ITG * kon1
static

◆ kscale1

ITG * kscale1
static

◆ lakon1

char* lakon1
static

◆ mass1

ITG * mass1
static

◆ matname1

char * matname1
static

◆ mi1

ITG * mi1
static

◆ mortar1

ITG * mortar1
static

◆ nactdof1

ITG * nactdof1
static

◆ nalcon1

ITG * nalcon1
static

◆ nasym1

ITG * nasym1
static

◆ nbody1

ITG * nbody1
static

◆ nboun1

ITG * nboun1
static

◆ ncmat1_

ITG * ncmat1_
static

◆ ncocon1

ITG * ncocon1
static

◆ ndirboun1

ITG * ndirboun1
static

◆ ndirforc1

ITG * ndirforc1
static

◆ ne01

ITG * ne01
static

◆ ne1

ITG * ne1
static

◆ nelcon1

ITG * nelcon1
static

◆ nelemload1

ITG * nelemload1
static

◆ neq1

ITG * neq1
static

◆ network1

ITG * network1
static

◆ nforc1

ITG * nforc1
static

◆ nk1

ITG* nk1
static

◆ nload1

ITG * nload1
static

◆ nmethod1

ITG * nmethod1 =NULL
static

◆ nmpc1

ITG * nmpc1
static

◆ nodeboun1

ITG * nodeboun1
static

◆ nodeforc1

ITG * nodeforc1
static

◆ nodempc1

ITG * nodempc1
static

◆ norien1

ITG * norien1
static

◆ nplicon1

ITG * nplicon1
static

◆ nplkcon1

ITG * nplkcon1
static

◆ npmat1_

ITG * npmat1_
static

◆ nrhcon1

ITG * nrhcon1
static

◆ nshcon1

ITG * nshcon1
static

◆ nstate1_

ITG * nstate1_
static

◆ ntie1

ITG * ntie1
static

◆ ntmat1_

ITG * ntmat1_
static

◆ num_cpus

ITG num_cpus
static

◆ nzl1

ITG * nzl1
static

◆ nzs1

ITG * nzs1
static

◆ orab1

double * orab1
static

◆ physcon1

double * physcon1
static

◆ plicon1

double * plicon1
static

◆ plkcon1

double * plkcon1
static

◆ pmastsurf1

double * pmastsurf1
static

◆ prestr1

double * prestr1
static

◆ prop1

double * prop1
static

◆ pslavsurf1

double * pslavsurf1
static

◆ reltime1

double * reltime1
static

◆ rhcon1

double * rhcon1
static

◆ rhsi1

ITG * rhsi1
static

◆ shcon1

double * shcon1
static

◆ sideload1

char * sideload1
static

◆ springarea1

double * springarea1
static

◆ sti1

double * sti1
static

◆ stiffness1

ITG * stiffness1
static

◆ stx1

double * stx1
static

◆ t01

double * t01
static

◆ t11

double * t11
static

◆ thicke1

double * thicke1
static

◆ tieset1

char * tieset1
static

◆ time1

double * time1
static

◆ ttime1

double * ttime1
static

◆ veold1

double * veold1
static

◆ vold1

double * vold1
static

◆ xbody1

double * xbody1
static

◆ xboun1

double * xboun1
static

◆ xforc1

double * xforc1
static

◆ xload1

double * xload1
static

◆ xloadold1

double * xloadold1
static

◆ xstate1

double * xstate1
static

◆ xstateini1

double * xstateini1
static

◆ xstiff1

double * xstiff1
static
Hosted by OpenAircraft.com, (Michigan UAV, LLC)