TYPE BSDFGeomDescr
TYPE (BasisStruct) :: Inc !Basis for incident hemisphere
TYPE (Vector), DIMENSION(:), ALLOCATABLE :: sInc !Central direction vectors of incident grid (World coords)
TYPE (BSDFDaylghtPosition), DIMENSION(:), ALLOCATABLE :: pInc ! azimuth and altitude of incidence vectors
REAL(r64), DIMENSION(:), ALLOCATABLE :: CosInc ! cosine of incident angle
REAL(r64), DIMENSION(:), ALLOCATABLE :: DAInc ! cosine of incident angle times delta theta time delta phi
! (used in daylighting calculations)
INTEGER :: NSkyUnobs !Number of Inc basis rays from unobstructed sky
INTEGER :: NGndUnobs !Number of Inc basis rays from unobstructed ground
INTEGER :: NSky !Number of Inc basis rays from sky
INTEGER :: NGnd !Number of Inc basis rays from gnd
INTEGER :: NReflSurf !Number of Inc basis rays from (potentially reflecting) surfaces
INTEGER, DIMENSION(:), ALLOCATABLE :: SkyIndex !list of sky basis indices
INTEGER, DIMENSION(:), ALLOCATABLE :: GndIndex !list of gnd basis indices
TYPE (Vector), DIMENSION(:), ALLOCATABLE :: GndPt !gnd intersection pt of gnd basis ray (z=0)
INTEGER, DIMENSION(:), ALLOCATABLE :: RefSurfIndex !list of basis indices of rays striking exterior surf
INTEGER, DIMENSION(:), ALLOCATABLE :: RefRayNHits !for a given ray striking a surface, no. of surfaces pierced
INTEGER, DIMENSION(:,:), ALLOCATABLE :: HitSurfNo !for a given ray striking surface, list of intersected surf nos
REAL(r64), DIMENSION(:,:), ALLOCATABLE :: HitSurfDSq ! for a given ray striking surface, list of distance^2
! from window
TYPE (Vector), DIMENSION(:,:), ALLOCATABLE :: HitPt ! for a given ray striking surface, list of hit pts
REAL(r64), DIMENSION(:), ALLOCATABLE :: SolSkyWt !Sky intensity weights
REAL(r64), DIMENSION(:), ALLOCATABLE :: SolSkyGndWt !Wts for sky rad refl from grn
REAL(r64), DIMENSION(: , : , : ), ALLOCATABLE :: SolBmGndWt !Wts for beam rad refl from gnd (hour, timestep)
INTEGER, DIMENSION( : , : ), ALLOCATABLE :: SolBmIndex !Basis index corresponding to beam dir (hour, timestep)
!Note this is zero if sun is not in incident hemisphere
!otherwise in range 1..NBasis
REAL(r64), DIMENSION(: , :), ALLOCATABLE :: ThetaBm ! Theta angle corresponging to beam dir (hour, timestep) (rad)
REAL(r64), DIMENSION(: , :), ALLOCATABLE :: PhiBm ! Theta angle corresponging to beam dir (hour, timestep) (rad)
TYPE (BasisStruct) :: Trn
TYPE (Vector), DIMENSION(:), ALLOCATABLE :: sTrn !Central direction vectors of Outgoing grid (World coords)
TYPE (BSDFDaylghtPosition), DIMENSION(:), ALLOCATABLE :: pTrn ! azimuth and altitude of incidence vectors
INTEGER, DIMENSION(:), ALLOCATABLE :: NSurfInt !No. of basis rays intersecting back surface (dim from
!NBkSurf in BSDF State Descr)
INTEGER, DIMENSION(:,:), ALLOCATABLE :: SurfInt !Basis index (IBkSurf, j) of the jth ray intersecting IBkSurf
REAL(r64), DIMENSION (: , : ), ALLOCATABLE :: SjdotN !dot product (IBksurf, j) of the jth ray direction with
! the normal to the back surface
REAL(r64), DIMENSION(:,:), ALLOCATABLE :: AOverlap ! Overlap areas for each outgoing
! direction (Trn) (no of outgoing dir, NBKSurf)
REAL(r64), DIMENSION(:,:), ALLOCATABLE :: ARhoVisOverlap ! Overlap areas multiplied with surface reflectance for each outgoing
! direction (Trn) (no of outgoing dir, NBKSurf)
REAL(r64), DIMENSION(:), ALLOCATABLE :: AveRhoVisOverlap ! Average visible reflectance from overlap surface which
! originates from one outgoing direction
LOGICAL :: InitState = .TRUE. ! Flag for marking that state needs to be initalized
END TYPE BSDFGeomDescr