subroutine Init_Mesh2D_t(this,nGeo,nElem,nSides,nNodes,nBCs)
implicit none
class(Mesh2D_t),intent(inout) :: this
integer,intent(in) :: nGeo
integer,intent(in) :: nElem
integer,intent(in) :: nSides
integer,intent(in) :: nNodes
integer,intent(in) :: nBCs
! Local
integer :: i,j,l
this%nGeo = nGeo
this%nElem = nElem
this%nGlobalElem = nElem
this%nNodes = nNodes
this%nSides = nSides
this%nCornerNodes = 0
this%nUniqueNodes = 0
this%nUniqueSides = 0
this%nBCs = nBCs
allocate(this%elemInfo(1:6,1:nElem))
allocate(this%sideInfo(1:5,1:4,1:nElem))
allocate(this%nodeCoords(1:2,1:nGeo+1,1:nGeo+1,1:nElem))
allocate(this%globalNodeIDs(1:nGeo+1,1:nGeo+1,1:nElem))
allocate(this%CGNSCornerMap(1:2,1:4))
allocate(this%CGNSSideMap(1:2,1:4))
allocate(this%BCType(1:4,1:nBCs))
allocate(this%BCNames(1:nBCs))
! Create lookup tables to assist with connectivity generation
this%CGNSCornerMap(1:2,1) = (/1,1/)
this%CGNSCornerMap(1:2,2) = (/nGeo+1,1/)
this%CGNSCornerMap(1:2,3) = (/nGeo+1,nGeo+1/)
this%CGNSCornerMap(1:2,4) = (/1,nGeo+1/)
! Maps from local corner node id to CGNS side
this%CGNSSideMap(1:2,1) = (/1,2/)
this%CGNSSideMap(1:2,2) = (/2,3/)
this%CGNSSideMap(1:2,3) = (/4,3/)
this%CGNSSideMap(1:2,4) = (/1,4/)
endsubroutine Init_Mesh2D_t