!   TITLE:  msh_standrd.mac (MESH)
!
!
!   OBJECTIVE:
!
!   This sub-macro is a standard (simplified) version of mesh algorithm for
!   simply meshing volumes with a sweep operation.
!
!
!   COMMAND SYNTAX:
!
!                       (1)     (2)     (3)      (4)      (5)  (6)   (7)
!        MSH_STANDRD, perfmsh, mstyp, mshdens, elmszovr, etpa, etpv, elmnl,
!
!                     elmxl, mat, real, perflsz
!                      (8)   (9)  (10)   (11)
!
!
!   ARGUMENTS:
!
!   The defaults are:
!
!               a.)  perform line sizing (PERFLSZ=1)
!               b.)  material type 1 (MTRL=1)
!               c.)  no specified real constant set (RL not specified)
!
!   This macro is used when the following MSH_ALGORITHM arguments need not be
!   specified:
!
!               a.) ECS:
!                       default element coordinate system is used
!
!               b.) VOLSEL:
!                       volumes DO NOT have to be specified for areas
!                       attached to more than 1 volume
!
!               c.) ATARGOV:
!                       target areas DO NOT have to be specified
!
!               d.) RADROT, VARCANG, ELL:
!                       where radii of rotation, volume arc angles and/or
!                       element longitudinal lengths DO NOT have to be
!                       specified
!
!
!   Therefore, the only arguments necessary for a basic execution of
!   MSH_ALGORITHM are:
!
!       (1) perfmsh = perform mesh options:
!
!             * 1 = perform area mesh operation only
!
!                 * NOTE: If specifying this option, this macro need not be
!                         used.  MSH_AREA is a further simplified version of
!                         MSH_ALGORITHM for the explicit purpose of area-meshing
!                         only.
!
!               2 = perform volume mesh operation only (use area
!                   sweeping; i.e., using the VSWEEP command)
!
!               3 = perform area and volume mesh operations
!                   (using area sweeping; i.e., using the VSWEEP
!                   command)
!
!               4 = free volume mesh
!
!               5 = transition mesh
!
!       (2) mstyp = mesh type:
!
!               0 (or blank) = free mesh
!
!               1 = map mesh
!
!       (3) mshdens = mesh density.  If the desired mesh density is coarse or
!                     fine, then this parameter will create the desired mesh.
!                     This will allow the line sizing algorithm to size all the
!                     lines that are less than or equal to 2.5 times the min-
!                     imum element edge length, ELMNL. This will aid in keeping
!                     element aspect ratios to reasonable values when the de-
!                     sired minimum element edge length, ELMNL, is more than 3
!                     times the smallest line. (e.g., for stress analysis, the
!                     desired mesh density is fine; and for dynamic analysis,
!                     the desired mesh density is coarse).
!
!                           0 (or blank) = fine mesh density
!
!                           1 = coarse mesh density
!
!                           n = user defined divisions for all lines less
!                               than or equal to 3.0*ELMNL.
!
!                     If MSHDENS is assigned any numerical value (n) other
!                     than 0 or 1, then any line that is less than or equal
!                     to 3 timesELMNL is sized that numerical value line
!                     divisions.
!
!       (4) elmszovr = element sizing over-ride parameter. In volume sweeping
!                      operations (PERFMSH=2 and PERFMSH=3), the number of
!                      elements swept in a volume length is normally calcu-
!                      lated by the algorithm based on an optimum element as-
!                      pect ratio approximately equal to 1. However, if a
!                      desired number of elements is specified in this par-
!                      ameter, then this value will over-ride the calculated
!                      value and sweep this number of elements.
!
!                      If ELMSZVOR is a negative number, then the algorithm
!                      will sweep the volume a number of elements with a user
!                      specified aspect ratio (the numerical value of ELMSZVOR)
!                      that are able to be fit along the volume sweep length.
!                      (e.g., if ELMSZVOR = -3, then the elements along the
!                      sweep length will be 3 times longer than ELMNL)
!
!       (5) etpa = element type to be used for area meshing
!
!       (6) etpv = element type to be used for volume meshing
!
!       (7) elmnl = element minimum edge length
!
!       (8) elmxl = element maximum edge length
!
!       *** (9) mat = material properties # to be used in meshing operations.
!                     If left blank, defaults to 1.
!
!       *** (10) real = real constant set #, if applicable.
!
!       *** (11) perflsz = perform line sizing option:
!
!                       0 = do not perform line sizing
!                       1 = perform line sizing (default)
!                       -1 = perform line sizing (DO NOT over-ride previous
!                            line sizing)
!
!
!       *** NOTE: Arguments 9, 10 and 11 are all defaults as listed above.
!                 Therefore, if using these defaults, then these arguments
!                 may be left blank. That is the purpose for placing these
!                 at the end of the argument list. Otherwise, they may be
!                 specified as needed.
!
!   See MSH_ALGORITHM documentation for an in-depth explanation of its use.
!
!
!   DESCRIPTION:
!
!   This macro may be used to execute MSH_ALGORITHM under the more common set
!   of circumstances encountered in a majority of volume meshing operations. Its
!   use will alleviate the cumbersome task of choosing the arguments to use or
!   specify in MSH_ALGORITHM when meshing volumes in models where most arguments
!   are not commonly used. Therefore, this macro may be used for simple volume
!   mesh operations implementing a simple linear sweep, i.e., no arced volumes,
!   where the source and target areas of the VSWEEP operation do not share any
!   common keypoint(s), and no specifying of element coordinate systems to mesh
!   within.
!
!
!
!
*get,prkey_,active,0,prkey
/nopr

pfmsh_=arg1
mtyp_=arg2
mdens_=arg3
eszovr_=arg4
etypa_=arg5
etypv_=arg6
mnl_=arg7
mxl_=arg8
mat_=arg9
rlcs_=ar10
lsiz_=ar11
!
!
*if,mat_,eq,0,then
    mat_=1
*endif
!
*if,lsiz_,eq,0,then
    lsiz_=1
*endif
!
msh_algorithm,lsiz_,pfmsh_,mtyp_,mdens_,eszovr_,,etypa_,etypv_,mnl_,mxl_,mat_,rlcs_
!
!
*set,pfmsh_,
*set,mtyp_,
*set,etypa_,
*set,etypv_,
*set,eszovr_,
*set,mdens_,
*set,mnl_,
*set,mxl_,
*set,mat_,
*set,rlcs_,
*set,lsiz_,


*if,prkey_,eq,1,then
    /go
*endif