allocate all variables in sbase
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_sBase), | intent(inout) | :: | sf |
self |
SUBROUTINE sBase_alloc( sf) ! MODULES IMPLICIT NONE !----------------------------------------------------------------------------------------------------------------------------------- ! INPUT VARIABLES !----------------------------------------------------------------------------------------------------------------------------------- ! OUTPUT VARIABLES CLASS(t_sBase), INTENT(INOUT) :: sf !! self !----------------------------------------------------------------------------------------------------------------------------------- ! LOCAL VARIABLES INTEGER :: i !=================================================================================================================================== ASSOCIATE(nElems=>sf%grid%nElems, degGP=>sf%degGP, deg=>sf%deg, nBase =>sf%nBase) ALLOCATE(sf%xi_GP( 0:degGP)) ALLOCATE(sf%w_GPloc( 0:degGP)) ALLOCATE(sf%w_GP((degGP+1)*nElems)) ALLOCATE(sf%s_GP((degGP+1)*nElems)) ALLOCATE(sf%base_GP( 0:degGP,0:deg,1:nElems)) ALLOCATE(sf%base_ds_GP(0:degGP,0:deg,1:nElems)) ALLOCATE(sf%base_offset( 1:nElems)) ALLOCATE(sf%base_dsAxis(0:deg,1:deg+1 )) ALLOCATE(sf%base_dsEdge(0:deg,nBase-deg:nBase)) ALLOCATE(sf%nDOF_BC( -(deg+1):NBC_TYPES)) ALLOCATE(sf%A_Axis( 1:deg+1,1:deg+1,-(deg+1):NBC_TYPES)) ALLOCATE(sf%invA_Axis(1:deg+1,1:deg+1,-(deg+1):NBC_TYPES)) ALLOCATE(sf%R_Axis( 1:deg+1,1:deg+1,-(deg+1):NBC_TYPES)) ALLOCATE(sf%AR_Axis( 1:deg+1,1:deg+1,-(deg+1):NBC_TYPES)) ALLOCATE(sf%A_Edge( nBase-deg:nBase,nBase-deg:nBase,1:NBC_TYPES)) ALLOCATE(sf%invA_Edge(nBase-deg:nBase,nBase-deg:nBase,1:NBC_TYPES)) ALLOCATE(sf%R_Edge( nBase-deg:nBase,nBase-deg:nBase,1:NBC_TYPES)) ALLOCATE(sf%AR_Edge( nBase-deg:nBase,nBase-deg:nBase,1:NBC_TYPES)) sf%xi_GP =0.0_wp sf%w_GPloc =0.0_wp sf%w_GP =0.0_wp sf%s_GP =0.0_wp sf%base_offset =-1 sf%base_GP =0.0_wp sf%base_ds_GP =0.0_wp sf%base_dsAxis =0.0_wp sf%base_dsEdge =0.0_wp sf%nDOF_BC =0 sf%A_Axis =0.0_wp sf%invA_Axis =0.0_wp sf%A_Edge =0.0_wp sf%invA_Edge =0.0_wp sf%R_Axis =0.0_wp sf%R_Edge =0.0_wp DO i=0,deg sf%A_Axis( 1+i,1+i,:)=1.0_wp sf%invA_Axis(1+i,1+i,:)=1.0_wp sf%R_Axis( 1+i,1+i,:)=1.0_wp sf%A_Edge( nBase-deg+i,nBase-deg+i,:)=1.0_wp sf%invA_Edge(nBase-deg+i,nBase-deg+i,:)=1.0_wp sf%R_Edge( nBase-deg+i,nBase-deg+i,:)=1.0_wp END DO SELECT TYPE(sf) TYPE IS(t_sbase_disc) ALLOCATE(sf%xiIP( 0:deg)) ALLOCATE(sf%wbaryIP(0:deg)) ALLOCATE(sf%DmatIP( 0:deg,0:deg)) sf%xiIP =0.0_wp sf%wbaryIP=0.0_wp sf%DmatIP =0.0_wp END SELECT !TYPE is t_sbase_disc END ASSOCIATE !nElems, degGP, deg END SUBROUTINE sbase_alloc