create or replace
PROCEDURE PREC_CEP_CALCULATED
AS
BEGIN
DECLARE
PREC_CEP_CALCULATIONS_ARRAY twodim_varray.array_t
:= twodim_varray.array_t();
MPI_D_DF NUMBER(10,6);
MPI_D_RG NUMBER(10,6);
S_DF NUMBER(10,6);
S_RG NUMBER(10,6);
i NUMBER;
j NUMBER;
k NUMBER;
l NUMBER;
CEP NUMBER(10,6);
TYPE RADIUS_ARRAY IS VARRAY(475) OF NUMBER(10,3);
RADIUS RADIUS_ARRAY := RADIUS_ARRAY();
delta_range NUMBER(10,3);
STEP_RADIUS NUMBER(10,3);
TYPE THETA_ARRAY IS VARRAY(507) OF NUMBER(10,2);
THETA THETA_ARRAY := THETA_ARRAY();
STEP_THETA NUMBER(10,2);
BEGIN
SELECT dR INTO delta_range FROM INTEGRATION_VARIABLES;
radius.extend(475);
FOR i IN 1 .. 475 LOOP
STEP_RADIUS:= delta_range * (i-1);
RADIUS(i):= STEP_RADIUS;
END LOOP;
THETA.EXTEND(507);
FOR i IN 1 .. 507 LOOP
STEP_THETA:= (3.141/253) * (i-1);
THETA(i) := STEP_THETA;
END LOOP;
PREC_CEP_CALCULATIONS_ARRAY.EXTEND;
PREC_CEP_CALCULATIONS_ARRAY(475)
:= twodim_varray.data_t();
PREC_CEP_CALCULATIONS_ARRAY(507).EXTEND;
PREC_CEP_CALCULATIONS_ARRAY (1) (1) := 0;
SELECT MPI_DELTA_DF INTO MPI_D_DF FROM INTEGRATION_VARIABLES;
SELECT MPI_DELTA_RG INTO MPI_D_RG FROM INTEGRATION_VARIABLES;
SELECT SIGMA_DF INTO S_DF FROM INTEGRATION_VARIABLES;
SELECT SIGMA_RG INTO S_RG FROM INTEGRATION_VARIABLES;
FOR k IN 1 .. 475 LOOP
FOR l IN 1 .. 507 LOOP
CEP:=PREC_CEP_CALCULATION(THETA(l), RADIUS(k), S_DF, S_RG, MPI_D_DF, MPI_D_RG);
prec_cep_calculations_array(k)(l):= CEP;
END LOOP;
END LOOP;
END;
END PREC_CEP_CALCULATED;
|