!*********************************************************************************************************************************************************!
!* Copyright (c) <2015> <Purdue University> All rights reserved.																					     *!
!*                                                                      																			     *!
!* Developed by:  Fang Jiang, Wenbin Yu                                                                                                                  *!
!*        <Prof. Yu’s Research Group>,                                                                                                                   *!
!*        <School of Aeronautics and Astronautics, Purdue University>                                                                                    *!
!*        <https://cdmhub.org/projects/ansysvabsgui2015>                                                                                                 *!
!*                                                                      																			     *!
!* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),    *!
!* to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,  *!
!* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:            *!
!*                                                                      																			     *!
!* •Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers.                        *!
!*                                                                      																			     *!
!* •Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the documentation *!
!*  and/or other materials provided with the distribution.                                                                                               *!
!*                                                                      																			     *!
!* •Neither the names of < Prof. Yu’s Research Group, School of Aeronautics and Astronautics, Purdue University >,                                       *!
!*  nor the names of its contributors may be used to endorse or promote products derived from this Software without specific prior written permission.   *!
!*                                                                      																			     *!
!* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   *!
!* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR     *!
!* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER     *!
!* DEALINGS WITH THE SOFTWARE. 																															 *!
!*********************************************************************************************************************************************************!

!		/UIS,MSGPOP,0      !All Messages Displayed
!		/UIS,MSGPOP,1      !Only notes, warnings, and errors
!		/UIS,MSGPOP,2      !Only warnings, and errors		
!		/UIS,MSGPOP,3      !Only errors

/UIS,MSGPOP,3      !Only errors

!eflag = 1 !3-Node Triangle
!eflag = 2 !6-Node Triangle
!eflag = 3 !4-Node Quadrilateral
!eflag = 4 !8-Node Quadrilateral

/GRAPHICS,FULL

ET, 1, PLANE42  !4-NODE -> 3-NODE
ET, 2, PLANE2   !6-NODE
ET, 3, PLANE182 !4-NODE
ET, 4, PLANE183  !8-NODE

*IF, eflag, EQ, 1, THEN
		TYPE, 1
		MSHAPE, 1, 2D      !Triagular element
	*ELSEIF, eflag, EQ, 2
		TYPE, 2
		MSHAPE, 1, 2D      !Triagular element
	*ELSEIF, eflag, EQ, 3
		TYPE, 3
		MSHAPE, 0, 2D      !Quadril element
	*ELSEIF, eflag, EQ, 4
		TYPE, 4
		MSHAPE, 0, 2D      !Quadril element
	*ELSE
*ENDIF

*IF, BSL_MESH, NE, 0, THEN
	!SMRTSIZE,SIZLVL,FAC,EXPAND,TRANS,ANGL,ANGH,GRATIO,SMHLC,SMANC,MXITR,SPRX
	!-------------------------------------------
	SMRTSIZE, SIZLVL, ,,,,,,,,10,
	LD = LAMDIREC_BSL_%BSL_MESH%
	nlam = NLAM_BSL_%BSL_MESH%_DIREC_%LD%
	ASEL, S, AREA, , anum_BSL%BSL_MESH%(1)
	*DO,i,2,nlam
		ASEL, A, AREA, , anum_BSL%BSL_MESH%(i)               !get Area number from layer order
	*ENDDO
	AMESH,ALL
	/UIS,MSGPOP,2      !Only warnings, and errors
	!-------------------------------------------
	ALLSEL,ALL
	/PNUM,LINE,0
	/PNUM,AREA,0
	/PNUM,VOLU,0
	/PNUM,NODE,0
	/PNUM,TABN,0
	/PNUM,SVAL,0
	/PNUM,elem,1
	/NUMBER,1 
	eplot
*ENDIF
ALLSEL,ALL

!/UIS,MSGPOP,2      ! Warnings and errors displayed (default)