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

Go to the source code of this file.

## Functions

void frdset (char *filabl, char *set, ITG *iset, ITG *istartset, ITG *iendset, ITG *ialset, ITG *inum, ITG *noutloc, ITG *nout, ITG *nset, ITG *noutmin, ITG *noutplus, ITG *iselect, ITG *ngraph)

## Function Documentation

 void frdset ( char * filabl, char * set, ITG * iset, ITG * istartset, ITG * iendset, ITG * ialset, ITG * inum, ITG * noutloc, ITG * nout, ITG * nset, ITG * noutmin, ITG * noutplus, ITG * iselect, ITG * ngraph )

Definition at line 24 of file frdset.c.

26  {
27
28  ITG j,k;
29
30  char noset[81];
31
32  /* check for a set, if any */
33
34  strcpy1(noset,&filabl[6],81);
35  for((*iset)=0;(*iset)<(*nset);(*iset)++){
36  if(strcmp2(&set[81**iset],noset,81)==0) break;
37  }
38  (*iset)++;
39  if(*iset>*nset)*iset=0;
40  // printf("iset,noutplus %" ITGFORMAT " %" ITGFORMAT "\n",*iset,*noutplus);
41
42  /* determining the number of nodes in the set */
43
44  if(*iset==0){
45
46  /* no set defined */
47
48  // printf("iselect,noutplus %" ITGFORMAT " %" ITGFORMAT "\n",*iselect,*noutplus);
49
50  if(*iselect==1){
51  *noutloc=*noutplus;
52  }else if(*iselect==-1){
53  *noutloc=*noutmin;
54  }else{
55  *noutloc=*nout;
56  }
57
58  }else{
59
60  /* a set was defined */
61
62  *noutloc=0;
63  for(j=istartset[*iset-1]-1;j<iendset[*iset-1];j++){
64  if(ialset[j]>0){
65  if(*iselect==-1){
66  if(inum[ialset[j]-1]<0) (*noutloc)++;
67  }else if(*iselect==1){
68  if(inum[ialset[j]-1]>0) (*noutloc)++;
69  }else{
70  if(inum[ialset[j]-1]!=0) (*noutloc)++;
71  }
72  }else{
73  k=ialset[j-2];
74  do{
75  k=k-ialset[j];
76  if(k>=ialset[j-1]) break;
77  if(*iselect==-1){
78  if(inum[k-1]<0) (*noutloc)++;
79  }else if(*iselect==1){
80  if(inum[k-1]>0) (*noutloc)++;
81  }else{
82  if(inum[k-1]!=0) (*noutloc)++;
83  }
84  }while(1);
85  }
86  }
87  if(*ngraph>1) (*noutloc)*=(*ngraph);
88  }
89
90
91 }
ITG strcmp2(const char *s1, const char *s2, ITG length)
Definition: strcmp2.c:24
ITG strcpy1(char *s1, const char *s2, ITG length)
Definition: strcpy1.c:24
#define ITG
Definition: CalculiX.h:51
Hosted by OpenAircraft.com, (Michigan UAV, LLC)