% Latex header for doxygen 1.10.0
  % Handle batch mode
  $latex_batchmode

  % to overcome problems with too many open files
  \let\mypdfximage\pdfximage\def\pdfximage{\immediate\mypdfximage}

  \pdfminorversion=7

  % Set document class depending on configuration
  \documentclass[twoside,openright,11pt]{report}

  %% moved from doxygen.sty due to workaround for LaTex 2019 version and unmaintained tabu package
  \usepackage{ifthen}
  \ifx\requestedLaTeXdate\undefined
    \usepackage{array}
  \else
    \usepackage{array}[=2016-10-06]
  \fi
  %%

  % Packages required by doxygen
  \makeatletter
  \providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
  % suppress package identification of infwarerr as it contains the word "warning"
  \let\@@protected@wlog\protected@wlog
  \def\protected@wlog#1{\wlog{package info suppressed}}
  \RequirePackage{infwarerr}
  \let\protected@wlog\@@protected@wlog
  \makeatother
  \IfFormatAtLeastTF{2016/01/01}{}{\usepackage{fixltx2e}} % for \textsubscript
  \IfFormatAtLeastTF{2015/01/01}{\pdfsuppresswarningpagegroup=1}{}

  \usepackage{doxygen}

  $extralatexstylesheet

  \usepackage{graphicx}
  \usepackage[utf8]{inputenc}
  \usepackage{makeidx}
  \PassOptionsToPackage{warn}{textcomp}
  \usepackage{textcomp}
  \usepackage[nointegrals]{wasysym}
  \usepackage{ifxetex}

  % NLS support packages
  $languagesupport

  % Define default fonts
  % Font selection
%%BEGIN LATEX_FONTENC
  \usepackage[$latexfontenc]{fontenc}
%%END LATEX_FONTENC

  \newcommand{\+}{\discretionary{\mbox{\scriptsize$\hookleftarrow$}}{}{}}

   % Arguments of doxygenemoji:
   % 1) ':<text>:' form of the emoji, already LaTeX-escaped
   % 2) file with the name of the emoji without the .png extension
   % in case image exist use this otherwise use the ':<text>:' form
   \newcommand{\doxygenemoji}[2]{%
     \IfFileExists{$latexemojidirectory/#2.png}{\raisebox{-0.1em}{\includegraphics[height=0.9em]{$latexemojidirectory/#2.png}}}{#1}%
   }

  % Page & text layout
  \usepackage[margin=1.0in]{geometry}
  \usepackage{changepage}

  % Allow a bit of overflow to go unnoticed by other means
  \tolerance=750
  \hfuzz=15pt
  \hbadness=750
  \setlength{\emergencystretch}{15pt}
  \setlength{\parindent}{0cm}
  \newcommand{\doxynormalparskip}{\setlength{\parskip}{3ex plus 2ex minus 2ex}}
  \newcommand{\doxytocparskip}{\setlength{\parskip}{1ex plus 0ex minus 0ex}}
  \doxynormalparskip
  % Redefine paragraph/subparagraph environments, using sectsty fonts
  \makeatletter
  \renewcommand{\paragraph}{%
    \@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{%
      \normalfont\normalsize\bfseries\SS@parafont%
    }%
  }
  \renewcommand{\subparagraph}{%
    \@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{%
      \normalfont\normalsize\bfseries\SS@subparafont%
    }%
  }
  \makeatother

  \makeatletter
  \newcommand\hrulefilll{\leavevmode\leaders\hrule\hskip 0pt plus 1filll\kern\z@}
  \makeatother

  % Headers & footers
  \usepackage{fancyhdr}

  \fancypagestyle{fancyplain}{
    \setlength{\headheight}{30.0pt}
    \fancyhf{}
    \fancyhead[L]{{\small \textsf{\ititle}} \\ \small{ \textsf{\idate}}}
    \fancyfoot[C]{{\small\textsf{\thepage}}}
    \fancyfoot[L]{{\small\textsf{\ireportnum}}}
  }

  \fancypagestyle{plain}{%
    \setlength{\headheight}{30.0pt}
    \fancyhf{}%
    \fancyhead[L]{{\small \textsf{\ititle}} \\ \small{ \textsf{\idate}}}
    \fancyfoot[C]{{\small\textsf{\thepage}}}
    \fancyfoot[L]{{\small\textsf{\ireportnum}}}
  }

  \fancypagestyle{first}{%
      \renewcommand{\headrulewidth}{0pt}
      \fancyhf{}
  }

  \fancypagestyle{back}{%
        \renewcommand{\headrulewidth}{0pt}
        \fancyhf{}
  }

  \pagestyle{fancyplain}


  \renewcommand{\chaptermark}[1]{%
    \markboth{#1}{}%
  }

  % ToC, LoF, LoT, bibliography, and index
  % Indices & bibliography
  \usepackage{natbib}
  \usepackage{tocloft}
  \usepackage{setspace}

  % Redefine section headers
  \usepackage{titlesec}
  \titleformat{\chapter}
    {\normalfont\LARGE\bfseries\sffamily}{\thechapter}{1em}{}
  \titlespacing*{\chapter}{0pt}{-30pt}{10pt}
  \titleformat*{\section}{\normalsize\bfseries\sffamily}
  \titleformat*{\subsection}{\normalsize\itshape\sffamily}
  \titleformat*{\subsubsection}{\normalsize\itshape\sffamily}
  \titleformat*{\paragraph}{\normalsize\itshape\sffamily}
  \titleformat*{\subparagraph}{\normalsize\itshape\sffamily}

  \setcounter{tocdepth}{1}
  \setcounter{secnumdepth}{5}

  % Beginning table of contents stuff
  \renewcommand{\contentsname}{Table of Contents}
  \setlength{\cftbeforetoctitleskip}{-0.1em}
  \setlength{\cftbeforeloftitleskip}{-0.1em}
  \setlength{\cftbeforelottitleskip}{-0.1em}
  \setlength{\cftaftertoctitleskip}{0.25em}
  \setlength{\cftafterloftitleskip}{0.25em}
  \setlength{\cftafterlottitleskip}{0.25em}
  \setlength{\cftsecnumwidth}{3em}

  \renewcommand\cftchapfont{\normalsize}
  \renewcommand\cftsecfont{\normalsize}
  \renewcommand\cftsubsecfont{\normalsize}
  \renewcommand\cftsubsubsecfont{\normalsize}

  \renewcommand\cftchappagefont{\normalsize}
  \renewcommand\cftsecpagefont{\normalsize}
  \renewcommand\cftsubsecpagefont{\normalsize}
  \renewcommand\cftsubsubsecpagefont{\normalsize}
  \renewcommand{\cfttoctitlefont}{\normalfont\LARGE\bfseries\sffamily}
  \renewcommand{\cftbeforechapskip}{0.15em}

  % Defined things for the title page
  \def\title#1{\def\ititle{#1}}
  \def\date#1{\def\idate{#1}}
  \def\logo#1{\def\ilogo{#1}}
  \def\division#1{\def\idivision{#1}}
  \def\reportnum#1{\def\ireportnum{#1}}
  \def\abstract#1{\def\iabstract{#1}}
  \def\backlogo#1{\def\ibacklogo{#1}}
  \def\address#1{\def\iaddress{#1}}
  \newcounter{cnt}
  \renewcommand\author[1]{%
    \stepcounter{cnt}%
    \csdef{text\thecnt}{#1}}
  \newcommand\getauthor[1]{%
    \csuse{text#1}}

  % creating indexes
  % $makeindex

  $extralatexpackages

  $latexspecialformulachars

%%BEGIN FORMULA_MACROFILE
  \input{$formulamacrofile}
%%END FORMULA_MACROFILE

  % Hyperlinks
%%BEGIN PDF_HYPERLINKS
    % Hyperlinks (required, but should be loaded last)
    \ifpdf
      \usepackage[pdftex,pagebackref=true]{hyperref}
    \else
      \ifxetex
        \usepackage[pagebackref=true]{hyperref}
      \else
        \usepackage[ps2pdf,pagebackref=true]{hyperref}
      \fi
    \fi

    \hypersetup{%
      colorlinks=true,%
      linkcolor=blue,%
      filecolor=magenta,%
      urlcolor=cyan,%
      unicode%
    }

%%END PDF_HYPERLINKS

  % Custom commands used by the header
  % Custom commands
  \newcommand*\cleartoleftpage{%
    \clearpage
    \ifodd\value{page}\hbox{}\newpage\fi
  }
  \newcommand{\clearemptydoublepage}{%
    \newpage{\pagestyle{empty}\cleardoublepage}%
  }

  % caption style definition
  \usepackage{caption}
  \captionsetup{labelsep=space,justification=centering,font={bf},singlelinecheck=off,skip=4pt,position=top}


  \renewcommand{\maketitle}{
  \pagenumbering{gobble}
  \newgeometry{left=1.38in,right=0.75in,top=0.5in,bottom=1.0in}
  \thispagestyle{first}

  % Do stuff here
  \begin{minipage}{0.5\textwidth}
  \hspace*{-0.69in}\includegraphics{\ilogo}
  \end{minipage}
  \begin{minipage}{0.5\textwidth}
  \begin{flushright}\textbf{\textsf{\large\ireportnum}}\end{flushright}
  \end{minipage}

  \vspace{2.25in}
  \begin{flushleft}
    \begin{spacing}{2}
      \noindent\LARGE\textbf{\textsf{\ititle}}
    \end{spacing}
  \end{flushleft}
  \vspace{-0.75in}

  \noindent\rule{\textwidth}{1pt}

  \vspace{0.75in}
  \begin{flushleft}
    \begin{spacing}{2}
      \noindent\large\textbf{\textsf{\idivision}}
    \end{spacing}
  \end{flushleft}

  \clearpage
  \restoregeometry

  % Disclaimer page
  \thispagestyle{empty}
  \ \\
  \vspace{2in} \ \\
  \begin{minipage}{4.4in}
  {\scriptsize \textbf{\textsf{About Argonne National Laboratory}}}
  \vspace{-0.9em}
  \begin{flushleft}
  {\scriptsize
  \textsf{Argonne is a U.S. Department of Energy laboratory managed by UChicago Argonne, LLC
  under contract DE-AC02-06CH11357. The Laboratory's main facility is outside Chicago,
  at 9700 South Cass Avenue, Argonne, Illinois 60439. For information about Argonne
  and its pioneering science and technology programs, see www.anl.gov.
  }
  \par
  }
  \end{flushleft}
  \end{minipage}

  \vspace{0.75in} \ \\

  \noindent
  \begin{minipage}{4.5in}
  \begin{flushleft}
  {\scriptsize \textbf{\textsf{\uppercase{Document Availability}}}}
  \par
  \vspace{0.5em}
  \hfill\begin{minipage}{4.375in}
  {\scriptsize
  \textsf{\textbf{Online Access:} U.S. Department of Energy (DOE) reports produced after 1991 and a
  growing number of pre-1991 documents are available free at OSTI.GOV
  (http://www.osti.gov/), a service of the U.S. Dept. of Energy's Office of Scientific and
  Technical Information}
  \par
  }
  \end{minipage}

  \vspace{0.5em}
  \begin{spacing}{0.7}
  {\scriptsize \textsf{\textbf{Reports not in digital format may be purchased by the public from the \\
  National Technical Information Service (NTIS):}}}
  \end{spacing}

  \vspace{0.5em}

  \hfill\begin{minipage}{4.375in}
  {\scriptsize
  \textsf{U.S. Department of Commerce} \\
  \textsf{National Technical Information Service} \\
  \textsf{5301 Shawnee Rd} \\
  \textsf{Alexandria, VA 22312} \\
  \textsf{\textbf{www.ntis.gov}} \\
  \textsf{Phone: (800) 553-NTIS (6847) or (703) 605-6000} \\
  \textsf{Fax: (703) 605-6900} \\
  \textsf{Email: \textbf{orders@ntis.gov}}
  \par
  }
  \end{minipage}

  \vspace{0.5em}
  \begin{spacing}{0.7}
  {\scriptsize \textsf{\textbf{Reports not in digital format are available to DOE and DOE contractors from the \\
  Office of Scientific and Technical Information (OSTI)}}}
  \end{spacing}

  \vspace{0.5em}

  \hfill\begin{minipage}{4.375in}
  {\scriptsize
  \textsf{U.S. Department of Energy} \\
  \textsf{Office of Scientific and Technical Information} \\
  \textsf{P.O. Box 62} \\
  \textsf{Oak Ridge, TN 37831-0062} \\
  \textsf{\textbf{www.osti.gov}} \\
  \textsf{Phone: (865) 576-8401} \\
  \textsf{Fax: (865) 576-5728} \\
  \textsf{Email: \textbf{reports@osti.gov}}
  \par
  }
  \end{minipage}

  \end{flushleft}
  \end{minipage}

  \vfill

  \noindent
  \begin{minipage}{5in}
  {\scriptsize \textbf{\textsf{Disclaimer}}}
  \vspace{-0.9em}
  \begin{flushleft}
  {\tiny
  \textsf{This report was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States
  Government nor any agency thereof, nor UChicago Argonne, LLC, nor any of their employees or officers, makes any warranty, express
  or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus,
  product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific
  commercial product, process, or service by trade name, trademark, manufacturer, or otherwise, does not necessarily constitute or imply
  its endorsement, recommendation, or favoring by the United States Government or any agency thereof. The views and opinions of
  document authors expressed herein do not necessarily state or reflect those of the United States Government or any agency thereof,
  Argonne National Laboratory, or UChicago Argonne, LLC.
  }
  \par
  }
  \end{flushleft}
  \end{minipage}

  \clearpage

  \thispagestyle{empty}

  \begin{flushright}\textbf{\textsf{\large\ireportnum}}\end{flushright}

  \vspace{2.25in}
  \begin{flushleft}
    \begin{spacing}{2}
      \noindent{\LARGE\textbf{\textsf{\ititle}}}
    \end{spacing}
  \end{flushleft}
  \vspace{-0.5in}

  \noindent\rule{\textwidth}{1pt}

  \vspace{0.75in}
  \begin{flushleft}
      \noindent\textsf{prepared by} \\
      \newcounter{acount}
      \setcounter{acount}{0}
      \whileboolexpr{ test {\ifnumcomp{\value{acount}}{<}{\thecnt}}}{
        \stepcounter{acount}\noindent\textsf{\getauthor{\theacount}} \\
      }
      \vspace{0.5in}\noindent\textsf{\idivision} \\
      \vspace{0.5in}\noindent\textsf{\idate}
  \end{flushleft}


  \clearpage

  % Blank
  \thispagestyle{empty}
  \ \\
  \clearpage

  \frontmatter

  \makeabstract

  % TOC
  \clearemptydoublepage
  {
    \hypersetup{hidelinks}
    \tableofcontents
  }

  \mainmatter
  }

  \newcommand{\frontmatter}{
        % Switch to standard header
        \cleardoublepage
        \pagestyle{fancy}
        \pagenumbering{roman}
  }

  \newcommand{\makeabstract}{
        % Abstract
        \cleardoublepage
        \chapter*{Abstract}
        \addcontentsline{toc}{chapter}{Abstract}
        \iabstract
        \clearpage
  }

  \newcommand{\mainmatter}{
        % Switch
        \cleardoublepage
        \pagestyle{fancy}
        \pagenumbering{arabic}
  }

  \newcommand{\backtitle}{
        \pagestyle{empty}
        \clearpage
        \hbox{}
        \cleartoleftpage
        \pagestyle{back}
        \pagenumbering{gobble}

        \newgeometry{left=1.2in,right=0.75in,top=0.5in,bottom=0.5in}

        % Do stuff here
        \begin{minipage}{0.5\textwidth}
        \hspace*{-0.69in}\includegraphics{\ilogo}
        \end{minipage}

        \vspace{0.5in}

        \begin{flushleft}
          \noindent
          {\large\textsf{\textbf{\idivision}}} \\

          \noindent
          \textsf{\iaddress}
        \end{flushleft}

        \vfill
        \noindent
        \includegraphics{\ibacklogo} \\
        {\tiny \textsf{
              Argonne National Laboratory is a U.S. Department of Energy  \\
              laboratory managed by UChicago Argonne, LLC
        }\par}
  }

% End of preamble, now comes the document contents
%===== C O N T E N T S =====

\begin{document}

$latexdocumentpre

\title{NEML2: Efficient, vectorized material modeling}
\author{Tianchen Hu, Argonne National Laboratory}
\author{Mark C. Messner, Argonne National Laboratory}

\date{September 2023}
\logo{anl.png}
\backlogo{doe.png}
\division{Applied Materials Division}
\reportnum{ANL-23/44}
\address{Argonne National Laboratory \\ 9700 South Cass Avenue, Bldg. 212 \\ Argonne, IL 60439 \\ \ \\ www.anl.gov}
\abstract{NEML2, the New Engineering Material model Library version 2, is a general-purpose material modeling library. It is designed to be efficient on both CPUs and GPUs. NEML2 is provided as open source software under the MIT license. This document is automatically generated using Doxygen and serves as the user manual for NEML2 release 1.3.1.}

% Titlepage & ToC
%%BEGIN PDF_HYPERLINKS
%%BEGIN USE_PDFLATEX
% To avoid duplicate page anchors due to reuse of same numbers for
% the index (be it as roman numbers)
\hypersetup{
  pageanchor=false,
  bookmarksnumbered=true,
  pdfencoding=unicode
}
%%END USE_PDFLATEX
%%END PDF_HYPERLINKS

\maketitle

%%BEGIN PDF_HYPERLINKS
%%BEGIN USE_PDFLATEX
% re-enable anchors again
\hypersetup{
  pageanchor=true
}
%%END USE_PDFLATEX
%%END PDF_HYPERLINKS

%--- Begin generated contents ---

