**************************
Auto Angle Contact Subsets
**************************

.. code-block:: sierrainput

   BEGIN CONTACT SURFACE <string>name
     INCLUDE ALL BLOCKS
     BLOCK = <string list>block_names
     ELEMENT = <int list>elem_numbers
     SURFACE = <string list>surface_names
     ASSEMBLY = <string list>assembly_names
     REMOVE BLOCK = <string list>block_names
     REMOVE SURFACE = <string list>surface_names       
     CONTACT TYPE = STANDARD | SMOOTH (STANDARD)
     AUTO SUBSET <string>subname [NUMBER OF SUBSETS <integer>] [ANGLE <real>(60)]
   END [CONTACT SURFACE <string>name]

A contact surface can optionally be subdivided into multiple sub-surfaces based on the angle between surface normals. Contact surfaces that are connected and whose normals are less than the angle are grouped together into sub-surfaces. The angle can be specified in degrees with the optional `ANGLE` argument. It will create the number of subsets specified by the optional `NUMBER OF SUBSETS` argument. The angle is set to 60 degrees by default. By default, the number of subsets created will be 360.0 divided by the angle defined or set by default rounded down to the nearest integer. Thus, if both defaults are used, it will create 6 subsets. Only one auto subset command line can be specified per contact surface. Shared nodes between created subsets will go into the lowest numbered sub-surface. The ordering of auto subsets is based on the lowest face ID on the surface. It is not based on the normal direction or any other identifying features of the mesh. If the IDs on the mesh are changed, the surface indices will change.

For example, the following command:

.. code-block:: sierrainput

   BEGIN CONTACT SURFACE surf1
     BLOCK = block_1
     AUTO SUBSET sub1 NUMBER OF SUBSETS 6 ANGLE 45.0 
   END

on a unit hex will create six sub-surfaces, ``surf1_sub1_auto_1``, ``surf1_sub1_auto_2``, ... ``surf1_sub1_auto_6``, since `NUMBER OF SUBSETS` is set to 6. Since the angle between each set of surface normals exceeds the specified 45 degrees, each sub-surface will contain 1 contact surface. 

.. warning::

   If more subsets are found than the number specified for `NUMBER OF SUBSETS` or the default (6), the excess contact surfaces will be put into the default contact surface and may give unexpected results.

.. warning::

   Specifying an excessive number of subsets for `NUMBER OF SUBSETS` will create empty subsets that will significantly slow down the
   simulation.

.. warning::

   Within a contact surface, only one subset type can be specified. Thus, subset with normal and auto subset cannot be specified for a given contact surface. For example, the following is not permitted:

.. code-block:: sierrainput

   BEGIN CONTACT SURFACE surf1
     BLOCK = block_1
     SUBSET sub1 WITH NORMAL  1  0  0 
     AUTO SUBSET sub2 NUMBER OF SUBSETS 6 ANGLE 45.0 
   END
