CalculiX  2.8 A Free Software Three-Dimensional Structural Finite Element Program
#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include "CalculiX.h"

Go to the source code of this file.

## Functions

void insertrad (ITG *ipointer, ITG **irowp, ITG **nextp, ITG *i1, ITG *i2, ITG *ifree, ITG *nzs_)

## Function Documentation

 void insertrad ( ITG * ipointer, ITG ** irowp, ITG ** nextp, ITG * i1, ITG * i2, ITG * ifree, ITG * nzs_ )

Definition at line 24 of file insertrad.c.

25  {
26
27  /* inserts a new nonzero matrix position into the data structure
28  in FORTRAN notation:
29  - ipointer(i) points to a position in field irow containing
30  the row number of a nonzero position in column i;
31  next(ipointer(i)) points a position in field irow containing
32  the row number of another nonzero position in column i, and
33  so on until no nonzero positions in column i are left; for
34  the position j in field irow containing the momentarily last
35  nonzero number in column i we have next(j)=0
36
37  special version of insert.c for the call in mastructrad.c
38
39  notice that in C the positions start at 0 and not at 1 as in
40  FORTRAN; the present routine is written in FORTRAN convention */
41
42  ITG *irow=NULL,*next=NULL;
43
44  irow=*irowp;
45  next=*nextp;
46
47  ++*ifree;
48  if(*ifree>*nzs_){
49  *nzs_=(ITG)(1.1**nzs_);
50  RENEW(irow,ITG,*nzs_);
51  RENEW(next,ITG,*nzs_);
52  }
53
54  irow[*ifree-1]=*i2;
55  next[*ifree-1]=ipointer[*i1-1];
56  ipointer[*i1-1]=*ifree;
57
58  *irowp=irow;
59  *nextp=next;
60
61  return;
62
63 }
#define RENEW(a, b, c)
Definition: CalculiX.h:40
#define ITG
Definition: CalculiX.h:51
Hosted by OpenAircraft.com, (Michigan UAV, LLC)