[BACK]Return to process_io.ads CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / PHC / Ada / Continuation

Annotation of OpenXM_contrib/PHC/Ada/Continuation/process_io.ads, Revision 1.1.1.1

1.1       maekawa     1: with text_io;                            use text_io;
                      2: with Standard_Floating_Numbers;          use Standard_Floating_Numbers;
                      3: with Standard_Complex_Numbers;           use Standard_Complex_Numbers;
                      4: with Standard_Complex_Vectors;           use Standard_Complex_Vectors;
                      5: with Standard_Complex_Solutions;         use Standard_Complex_Solutions;
                      6:
                      7: package Process_io is
                      8:
                      9: -- DESCRIPTION :
                     10: --   This package determines the output operations during the continuation.
                     11: --   The purpose is to concentrate all trivial output operations which could
                     12: --   possibly overload the coding of the continuation process.
                     13: --   Moreover, an uniform output format is achieved by this package.
                     14:
                     15:   type output_code is ( nil,s,p,c,sp,sc,pc,spc );
                     16:
                     17:   -- Explanation of the output_code :
                     18:   --   nil  :  nothing will be written during the continuation process
                     19:   --   s    :  all intermediate solutions are written
                     20:   --   p    :  predictor information is written
                     21:   --   c    :  corrector information is written
                     22:   --   sp, sc, pc and spc are combinations of s, p and c
                     23:
                     24:   procedure Set_Output_Code ( u : in output_code );
                     25:
                     26:   -- DESCRIPTION :
                     27:   --   Sets the status code for output during continuation.
                     28:
                     29:   procedure Write_path ( n : in positive );
                     30:   procedure Write_path ( ft : in file_type; n : in positive );
                     31:
                     32:   -- DESCRIPTION :
                     33:   --   The number of the paths is written on file or on standard output.
                     34:
                     35:   procedure Write_block ( n : in positive );
                     36:   procedure Write_block ( ft : in file_type; n : in positive );
                     37:
                     38:   -- DESCRIPTION :
                     39:   --   The block number is written on the output device
                     40:
                     41:   procedure sWrite ( sol : in Solution);
                     42:   procedure sWrite ( ft : in file_type; sol : in Solution );
                     43:
                     44:   -- DESCRIPTION :
                     45:   --   The solution is written on file or on standard output.
                     46:
                     47:   procedure pWrite ( step : in double_float; t : in Complex_Number );
                     48:   procedure pWrite ( ft : in file_type;
                     49:                      step : in double_float; t : in Complex_Number );
                     50:   procedure pWrite ( step : in double_float; t : in Complex_Number;
                     51:                      sol : in Solution );
                     52:   procedure pWrite ( ft : in file_type; step : in double_float;
                     53:                      t : in Complex_Number; sol : in Solution );
                     54:   -- DESCRIPTION :
                     55:   --   The predictor information is written on file or on standard output.
                     56:
                     57:   procedure cWrite ( normax,normrx,normaf,normrf : in double_float );
                     58:   procedure cWrite ( ft : in file_type;
                     59:                      normax,normrx,normaf,normrf : in double_float );
                     60:
                     61:   -- DESCRIPTION :
                     62:   --   The norm of the correction on x and residual is written.
                     63:
                     64:   -- ON ENTRY :
                     65:   --   ft       file type, must be created or opened for output,
                     66:   --            if not specified, then standard output will be taken;
                     67:   --   normax   absolute norm of the correction dx on the solution x: ||dx||;
                     68:   --   normrx   relative norm of the correction dx: ||dx||/||x||;
                     69:   --   normaf   absolute norm of the residual: ||f(x)||;
                     70:   --   normrf   relative norm of the residual: ||f(x)||/||x||.
                     71:
                     72:   procedure cWrite ( rcond : in double_float; m : in natural );
                     73:   procedure cWrite ( ft : in file_type;
                     74:                      rcond : in double_float; m : in natural );
                     75:   -- DESCRIPTION :
                     76:   --   The estimate for the inverse condition number of the Jacobi matrix
                     77:   --   is written, jointly with the (estimated) multiplicity of the solution.
                     78:
                     79:   procedure Write_Statistics ( nstep,nfail,niter,nsyst : in natural );
                     80:   procedure Write_Statistics ( ft : in file_type;
                     81:                                nstep,nfail,niter,nsyst : in natural );
                     82:   -- DESCRIPTION :
                     83:   --   This procedure writes statistical information after the
                     84:   --   computation of parts of the results.
                     85:
                     86:   -- ON ENTRY :
                     87:   --   nstep     the number of predictor steps;
                     88:   --   nfail     the number of failures;
                     89:   --   niter     the number of corrector iterations;
                     90:   --   nsyst     the number of linear systems solved.
                     91:
                     92:   procedure Write_Total_Statistics ( tnstep,tnfail,tniter,tnsyst : in natural );
                     93:   procedure Write_Total_Statistics ( ft : in file_type;
                     94:                                      tnstep,tnfail,tniter,tnsyst : in natural );
                     95:   -- DESCRIPTION
                     96:   --   This procedure writes statistical information after the
                     97:   --   solution of the problem.
                     98:
                     99:   -- ON ENTRY :
                    100:   --   tnstep     the total number of predictor steps;
                    101:   --   tnfail     the total number of failures;
                    102:   --   tniter     the total number of corrector iterations;
                    103:   --   tnsyst     the total number of linear systems solved.
                    104:
                    105:   procedure Write_convergence_factor ( factor : in double_float );
                    106:   procedure Write_convergence_factor
                    107:                 ( ft : in file_type; factor : in double_float );
                    108:   -- DESCRIPTION :
                    109:   --   writes the convergence factor of the correction process
                    110:
                    111:   procedure sWrite_Solutions ( sols : in Solution_List );
                    112:   procedure sWrite_Solutions ( ft : in file_type; sols : in Solution_List );
                    113:
                    114:   -- DESCRIPTION :
                    115:   --   Writes down the computed solutions on standard output or on file.
                    116:
                    117: end Process_io;

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>