alg.h

Go to the documentation of this file.
00001 /*
00002 %M This module contains the data structure definitions for the solution
00003    algorithm.
00004 %a Joao Luiz Elias Campos.
00005 %d September 3rd, 1998.
00006 %r $Id: alg.h,v 1.1 2004/06/22 05:29:58 joaoluiz Exp $
00007 %w (C) COPYRIGHT 1995-1996, Eduardo Nobre Lages.
00008    (C) COPYRIGHT 1997-1998, Joao Luiz Elias Campos.
00009    All Rights Reserved
00010    Duplication of this program or any part thereof without the express
00011    written consent of the author is prohibited.
00012  *
00013  *   Modified:    08-Aug-05    Alexandre A. Del Savio
00014  *     Adicionado "_count_it".
00015  *
00016  *   Modified:    13-Sep-05    Alexandre A. Del Savio
00017  *     Criada a funcao AlgReset.
00018  *
00019  *   Modified:    08-Dec-05    Juan Pablo Ibañez
00020  *     Acrescentou-se o parâmetro numsteptol na struct config.
00021  *     Este parâmetro define o tamanho do vetor de erros usado
00022  *     para controle de convergencia.
00023  *
00024  *   Modified   16-Dez-05    Juan Pablo Ibañez
00025  *     Acrescentou-se o parâmetro delta na função _count_it.
00026  *
00027  */
00028 
00029 #ifndef _ALG_H
00030 #define _ALG_H
00031 
00032 #include "rui.h"
00033 
00034 /*
00035 %T Coupled state definition
00036 */
00037 typedef enum _coupstate
00038 {
00039  UNCOUPLED = 0,
00040  COUPLED   = 1
00041 } eCoupState;
00042 
00043 /*
00044 %T Configuration parameters
00045 */
00046 typedef struct _config
00047 {
00048  int    max_iter;
00049  int    nonlinear;
00050  int    print_step;
00051  int    draw_step;
00052  int    num_step;
00053  int    num_time_step;
00054  double tolerance;
00055  int    numsteptol; 
00056  double dtfrac;
00057  double totalTime;
00058  double timeStep;
00059  int    num_load_step;
00060  double loadfactor;
00061  int    algtype;
00062  int    numgaussresults;
00063  char   **gaussresults;
00064  int    solver;
00065 } sConfig;
00066 
00067 void    (*_count_it)(int, double, int); 
00068 void    (*_fstop)(int *); 
00069 
00070 /* Configuration parameters
00071  */
00072 extern sConfig  Config;
00073 
00074 extern void (*_count_it)(int, double, int);
00075 extern void (*_fstop)(int *);
00076 
00077 /* Flag to see if is a coupled problem
00078  */
00079 extern eCoupState State;
00080 
00081 /* Macro definition
00082  */
00083 #define IsGeomNonLinear  (Config.nonlinear == 1)
00084 #define IsCoupled        (State == COUPLED)
00085 
00086 /* Public functions
00087  */
00088 int  DRSolver( UI_State *, double *, double *, double *, double *, int );
00089 int  IMPLINEARSolver( UI_State *, double *, double *, double *, double *, int );
00090 int  IMPBFGSSolver( UI_State *, double *, double *, double *, double *, int );
00091 int  IMPNRMSolver( UI_State *, double *, double *, double *, double *, int );
00092 int  HYBRIDSolver(UI_State *R, double *FVector, double *UVector, double *VVector,
00093                double *MVector, int);
00094 void AlgReset( void );
00095 double ComputeError  ( double *, double *, double);
00096 void _dUVector( double *, double *, double *);
00097 int  NeedIteration ( double *, int *, int );
00098 #endif
00099 

Generated on Tue Oct 23 11:23:28 2007 for Relax by  doxygen 1.5.3