00001 #ifndef NONLINMAN_H 00002 #define NONLINMAN_H 00003 00004 #include <stdio.h> 00005 #include "alias.h" 00006 #include "galias.h" 00007 #include "iotools.h" 00008 00009 class gmatrix; 00010 00011 /** 00012 Class nonlinman defines type of solver of systems of nonlinear algebraic equations. 00013 00014 Created by JK, 16.6.2004 00015 */ 00016 00017 class nonlinman 00018 { 00019 public: 00020 00021 nonlinman (void); 00022 ~nonlinman (void); 00023 void read (XFILE *in,long mespr); 00024 void print (FILE *out); 00025 void read_selnod (XFILE *in); 00026 void read_seldof (XFILE *in); 00027 void read_seldofcoord (XFILE *in); 00028 void print_selnod (FILE *out); 00029 void print_seldof (FILE *out); 00030 void print_seldofcoord (FILE *out); 00031 00032 void allocavec(long n); 00033 void deallocavec(); 00034 void initiate (nonlinman &nm); 00035 00036 00037 /// type of solver of nonlinear algebraic equation system 00038 nonlinsolvertype tnlinsol; 00039 00040 /** TYPE OF STIFFNESS MATRIX 00041 stmat=1 - initial elastic stiffness 00042 stmat=2 - tangent stiffness 00043 stmat=3 - secant stiffness %matrix 00044 stmat=5 - incr_tangent_stiff - the stiffness %matrix is recalculated after one increment of the outer loop 00045 stmat=6 - ijth_tangent_stiff - the stiffness %matrix is recalculated after i-th step of the outer loop and after j-th step in the inner loop */ 00046 stiffmatrix stmat; 00047 /// the stiffness %matrix is recalculated after ithstiffchange steps in outer loop 00048 long ithstiffchange; 00049 /// the stiffness %matrix is recalculated after jthstiffchange steps in inner loop 00050 long jthstiffchange; 00051 00052 // ARC-LENGTH METHOD 00053 /// norm measure of displacement increments 00054 displacementnorm displnorm; 00055 /// determination of increment of load parameter 00056 detlambda dlam; 00057 /// hard-disc backup 00058 long hdbackupal; 00059 /// maximum number of increments 00060 long nial; 00061 /** maximum number of iterations in inner loop 00062 maximum number of iterations in one increment */ 00063 long niilal; 00064 /// required norm of vector of unbalanced forces 00065 double erral; 00066 /// length of arc 00067 double dlal; 00068 /// minimum length of arc 00069 double dlminal; 00070 /// maximum length of arc 00071 double dlmaxal; 00072 /// displacement-loading driving switch 00073 double psial; 00074 /// number of selected nodes (for norm computation) 00075 long nsnal; 00076 /// selected nodes (for norm computations) 00077 long *selnodal; 00078 /// number of selected DOFs (for norm computation) 00079 long nsdofal; 00080 /// selected degrees of freedom 00081 long *seldofal; 00082 /// coordinates of selected nodes 00083 double *selnodcoord; 00084 /// problem dimension (for increment of two node distance) 00085 long probdimal; 00086 /// unit vector between selected nodes 00087 double nxal,nyal,nzal; 00088 /* the stiffness %matrix can be modified in outer as well as in the inner loops 00089 for this purpose, two variables (ithstiffchange, jthstiffchange) are defined 00090 00091 */ 00092 00093 /// flag for checking of maximum total(cumulative) performed length of the arc 00094 flagsw check_tot_al; 00095 /// maximum total(cumulative) performed length of the arc 00096 double max_tot_al; 00097 00098 /// flag for checking of lambdar 00099 flagsw check_lambdar; 00100 /// required load coefficient for the proportional %vector 00101 double lambdar; 00102 00103 /// required error for lambdar tresholds 00104 double errl; 00105 00106 /// flag for detection of divergency of inner iteration loop 00107 flagsw check_div; 00108 /** the minimum number of performed inner iteration steps 00109 before the loop can be interrupted due to divergency 00110 (div_min_steps has to be greater or equal to 3)*/ 00111 long div_min_steps; 00112 /// array of stored step id (length of array = div_min_steps) 00113 double *divc_step; 00114 /// array of stored errors (length of array = div_min_steps) 00115 double *divc_err; 00116 00117 // NEWTON-RAPHSON METHOD 00118 /// maximum number of increments 00119 long ninr; 00120 /** maximum number of iterations in inner loop 00121 maximum number of iterations in one increment */ 00122 long niilnr; 00123 /// required norm of vector of unbalanced forces 00124 double errnr; 00125 /// magnitude of increment of loading 00126 double incrnr; 00127 /// minimum magnitude of increment of loading 00128 double minincrnr; 00129 /// maximum magnitude of increment of loading 00130 double maxincrnr; 00131 /// required value of lambda 00132 // double rvlam; 00133 00134 // the following data are used for Hinkley analysis only 00135 /// number of steps in the initial loop for equilibrium 00136 long nienr; 00137 /// harddisk backup restart indicator 00138 long hdbr; 00139 /// index of harddisk backup in the harddisk backup file 00140 long hdbid; 00141 /// backup filename 00142 char backupfname[1025]; 00143 }; 00144 00145 00146 #endif