bief_allmat.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\utils\bief\bief_allmat.f
00002 !
00059                      SUBROUTINE BIEF_ALLMAT
00060 !                    **********************
00061 !
00062      &( MAT , NOM , IELM1 , IELM2 , CFG , TYPDIA , TYPEXT , MESH )
00063 !
00064 !***********************************************************************
00065 ! BIEF   V6P1                                   21/08/2010
00066 !***********************************************************************
00067 !
00068 !
00069 !
00070 !
00071 !
00072 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00073 !| CFG            |-->| INFORMATION ON STORAGE OF MATRIX
00074 !|                |   | CFG(1): STORAGE   CFG(2): MATRIX-VECTOR PRODUCT
00075 !| IELM1          |-->| TYPE OF ELEMENT PER LINE
00076 !| IELM2          |-->| TYPE OF ELEMENT PER COLUMN
00077 !| MAT            |<->| THE MATRIX TO BE ALLOCATED
00078 !| MESH           |-->| MESH STRUCTURE
00079 !| NOM            |-->| FORTRAN NAME OF MATRIX
00080 !| TYPDIA         |-->| TYPE OF DIAGONAL ('Q', 'I' OU '0')
00081 !| TYPEXT         |-->| TYPE OF OFF-DIAGONAL TERMS :'Q','S' OU '0'
00082 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00083 !
00084       USE BIEF, EX_BIEF_ALLMAT => BIEF_ALLMAT
00085 !
00086       IMPLICIT NONE
00087       INTEGER LNG,LU
00088       COMMON/INFO/LNG,LU
00089 !
00090 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00091 !
00092       TYPE(BIEF_OBJ)  , INTENT(INOUT) :: MAT
00093       CHARACTER(LEN=6), INTENT(IN)    :: NOM
00094       INTEGER         , INTENT(IN)    :: IELM1,IELM2,CFG(2)
00095       CHARACTER(LEN=1), INTENT(IN)    :: TYPDIA,TYPEXT
00096       TYPE(BIEF_MESH) , INTENT(IN)    :: MESH
00097 !
00098 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00099 !
00100       INTEGER IELMD
00101 !
00102       CHARACTER(LEN=6) :: NAME
00103 !
00104 !-----------------------------------------------------------------------
00105 !  HEADER COMMON TO ALL OBJECTS
00106 !-----------------------------------------------------------------------
00107 !
00108 !     KEY OF THE OBJECT - TO CHECK MEMORY CRASHES
00109 !
00110       MAT%KEY = 123456
00111 !
00112 !     TYPE OF THE OBJECT (HERE MATRIX)
00113 !
00114       MAT%TYPE = 3
00115 !
00116 !     NAME OF THE OBJECT
00117 !
00118       MAT%NAME = NOM
00119 !
00120 !-----------------------------------------------------------------------
00121 !  PART SPECIFIC TO MATRICES
00122 !-----------------------------------------------------------------------
00123 !
00124 !     ELEMENT OF DIAGONAL (SMALLEST ELEMENT IF MATRIX IS RECTANGULAR)
00125       IELMD = IELM1
00126       IF(BIEF_NBPTS(IELM2,MESH).LT.BIEF_NBPTS(IELM1,MESH)) IELMD = IELM2
00127 !
00128 !  TYPE OF STORAGE
00129 !
00130       MAT%STO = CFG(1)
00131 !
00132 !  TYPES OF ELEMENTS FOR LINE AND COLUMN
00133 !
00134       MAT%ELMLIN = IELM1
00135       MAT%ELMCOL = IELM2
00136 !
00137 !  ALLOCATES THE DIAGONAL (UNTIL THIS PONIT MAT%D IS ONLY A POINTER)
00138 !
00139 !     MAT%D WILL POINT TO AN EXISTING BIEF_OBJ
00140       ALLOCATE(MAT%D)
00141 !
00142       NAME = 'D' // NOM(1:5)
00143       IF(TYPDIA(1:1).EQ.'Q') THEN
00144 !       ONLY CASE WHERE THE DIAGONAL DOES EXIST
00145         CALL BIEF_ALLVEC(1,MAT%D,NAME,IELMD,1,2,MESH)
00146       ELSE
00147         CALL BIEF_ALLVEC(1,MAT%D,NAME,0    ,1,0,MESH)
00148       ENDIF
00149 !     TYPE IS FORGOTTEN UNTIL INITIALISATION OF MATRIX
00150 !     MAT%TYPDIA = TYPDIA(1:1)
00151       MAT%TYPDIA = '?'
00152 !
00153 !     ALLOCATES OFF-DIAGONAL TERMS (AS FOR DIAGONAL)
00154 !
00155       ALLOCATE(MAT%X)
00156 !
00157       NAME = 'X' // NOM(1:5)
00158 !
00159       CALL BIEF_ALLVEC(1,MAT%X,NAME,
00160      &          BIEF_DIM1_EXT(IELM1,IELM2,CFG(1),TYPEXT,MESH),
00161      &          BIEF_DIM2_EXT(IELM1,IELM2,CFG(1),TYPEXT,MESH),0,MESH)
00162 !
00163 !     TYPE IS FORGOTTEN UNTIL INITIALISATION OF MATRIX
00164 !     MAT%TYPEXT = TYPEXT(1:1)
00165       MAT%TYPEXT = '?'
00166 !
00167 !     MATRIX X VECTOR PRODUCT
00168       MAT%PRO = CFG(2)
00169 !
00170 !-----------------------------------------------------------------------
00171 !
00172 !     IF(LNG.EQ.1) WRITE(LU,*) 'MATRICE : ',NOM,' ALLOUEE'
00173 !     IF(LNG.EQ.2) WRITE(LU,*) 'MATRIX: ',NOM,' ALLOCATED'
00174 !
00175 !-----------------------------------------------------------------------
00176 !
00177       RETURN
00178       END

Generated on Fri Aug 31 2013 18:12:58 by S.E.Bourban (HRW) using doxygen 1.7.0